ubuntu 14.04
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
设置密钥
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
安装
sudo apt-get update
sudo apt-get install ros-indigo-desktop-full
初始化rosdep
sudo rosdep init
rosdep update
安装rosinstall
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
设置环境
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
管理你的环境 export | grep ROS
source /opt/ros/indigo/setup.bash
创建ROS工作环境
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws/
catkin_make
catkin_make命令可以非常方便的建立一个catkin工作空间,在你的当前目录中可以看到有build和devel两个文件夹,在devel文件夹中可以看到许多个setup.*sh文件。启用这些文件都会覆盖你现在的环境变量,想了解更多,可以查看文档catkin。在继续下一步之前先启动你的新的setup.*sh 文件。
source devel/setup.bash
echo $ROS_PACKAGE_PATH
输出:/home/zhuquan/catkin_ws/src:/opt/ros/indigo/share:
/opt/ros/indigo/stacks