1 先创建工作空间
$ mkdir –p ~/dev/catkin_ws/src
$ cd ~/dev/catkin_ws/src
$ catkin_init_workspace
2 编译工作空间
$ cd ~/dev/catkin_ws
$ catkin_make
3永久添加环境变量
echo "source /opt/ros/xxx/setup.bash" >> ~/.bashrc
其中xxx是所用的ROS类型
4 创建包
$ cd ~/dev/catkin_ws/src
$ catkin_create_pk