1 Star 0 Fork 0

Jhon_tao/installROSTX2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setupCatkinWorkspace.sh 829 Bytes
一键复制 编辑 原始数据 按行查看 历史
jetsonhacks 提交于 2017-03-18 17:30 . Initial Commit
#!/bin/bash
# Create a Catkin Workspace and setup ROS environment variables
# Usage setupCatkinWorkspace.sh dirName
source /opt/ros/kinetic/setup.bash
DEFAULTDIR=~/catkin_ws
CLDIR="$1"
if [ ! -z "$CLDIR" ]; then
DEFAULTDIR=~/"$CLDIR"
fi
if [ -e "$DEFAULTDIR" ] ; then
echo "$DEFAULTDIR already exists; no action taken"
exit 1
else
echo "Creating Catkin Workspace: $DEFAULTDIR"
fi
echo "$DEFAULTDIR"/src
mkdir -p "$DEFAULTDIR"/src
cd "$DEFAULTDIR"/src
catkin_init_workspace
cd "$DEFAULTDIR"
catkin_make
#setup ROS environment variables
grep -q -F ' ROS_MASTER_URI' ~/.bashrc || echo 'export ROS_MASTER_URI=http://localhost:11311' | tee -a ~/.bashrc
grep -q -F ' ROS_IP' ~/.bashrc || echo "export ROS_IP=$(hostname -I)" | tee -a ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/jhon_tao/installROSTX2.git
git@gitee.com:jhon_tao/installROSTX2.git
jhon_tao
installROSTX2
installROSTX2
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385