1安装环境配置(桌面进入命令行)
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc source ~/.bashrc
1.1 为编译添加
source ~/catkin_ws/devel/setup.bash
2 为自己创建的包配置环境
临时
source /home/dongdong/catkin_ws/devel/setup.bash
永久
echo "source /home/dongdong/catkin_ws/devel/setup.bash" >> ~/.bashrc source ~/.bashrc
3查看环境路径
echo $ROS_PACKAGE_PATH
4 快速创建包
//如果没有该文件夹 自动创建并进入 mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src
//初始化
catkin_init_workspace
// 创建一个ROS包 catkin_create_pkg beginner_tutorials std_msgs rospy roscpp // 进入包并编译 cd ~/catkin_ws/ catkin_make