参考网址
ROS的官方wiki:Ubuntu install of ROS Kinetic
1.设置软件中心
Configure your Ubuntu repositories to allow “restricted,” “universe,” and “multiverse.” You can follow the Ubuntu guide for instructions on doing this.
2.设置sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3.设置密钥keys
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
4.安装
安装前得先update,更新软件源:
sudo 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
Individual Package: You can also install a specific ROS package (replace underscores with dashes of the package name):
sudo apt-get install ros-kinetic-PACKAGE
e.g.
sudo apt-get install ros-kinetic-slam-gmapping
如果要查看能够使用的软件包,可以用如下命令:
apt-cache search ros-kinetic
5.初始化
sudo rosdep init
rosdep update
6.设置环境
配置环境变量:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
7.安装工具
为了编译一些ros的安装包,需要安装以下工具和依赖项:
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential