ROS 开发环境安装

系统环境ubuntu 16.04 32位

1. 配置sources.list
官方源没成功,我选的ustc源

#官方源
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
#中国科技大学
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
#清华大学
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
#设置密钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 

2. 安装
选择版本进行安装,第一次安装我选择Desktop-Full,需要2,250 MB空间

apt-get update
#Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
sudo apt-get install ros-kinetic-desktop-full

#Desktop Install: ROS, rqt, rviz, and robot-generic libraries
sudo apt-get install ros-kinetic-desktop

#ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.
sudo apt-get install ros-kinetic-ros-base

3. 初始化rosdep

sudo rosdep init
rosdep update

4. 配置环境变量

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
Tags: