先贴上官方网址http://wiki.ros.org/kinetic/Installation/Ubuntu
1 Configure your Ubuntu repositories
Configure your Ubuntu repositories to allow “restricted,” “universe,” and “multiverse.” You can follow the Ubuntu guide for instructions on doing this.
2 Setup your 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 Set up your keys
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4 Installation
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
5 Initialize rosdep
sudo rosdep init
rosdep update
6 Environment setup
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
或者选择每打开一次终端就刷新一次的话:
source /opt/ros/kinetic/setup.bash
7 Dependencies for building packages
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
8 测试ROS
首先启动ROS
roscore
启动roscore后,重新打开一个终端窗口,输入,出现小海龟:
rosrun turtlesim turtlesim_node
操纵小海龟,重新打开新的一个终端,输入:
rosrun turtlesim turtle_teleop_key
9 ROS Tutorials
Now, to test your installation, please proceed to the ROS Tutorials.