切换镜像源
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'
添加 sources.list
设置你的电脑可以从 packages.ros.org 接收软件.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
添加 keys
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
如果你遇到连接到keyserver的问题,你可以在以上命令尝试替换hkp://pgp.mit.edu:80或hkp://keyserver.ubuntu.com:80。
安装
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
初始化 rosdep
sudo rosdep
init rosdep update
环境配置
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc
构建工厂依赖
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
到此,ROS安装完成