The detailed process of installing ROS Kinetic on Ubuntu16.04 (concise and concise)

1. Set 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'

2. Set the key (the public key has been updated)

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

3. Update the package

sudo apt-get update

4. Install the full version of ROS kinetic

sudo apt-get install ros-kinetic-desktop-full

5. Initialize rosdep

Note: rosdep needs to be initialized before using ROS

sudo rosdep init
rosdep update

6. Configure the ROS environment

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

7. Install dependencies

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

8. Test whether ROS is installed successfully

(1), CTRL+ALT+T to open the terminal (Termial), enter the following command to initialize the ROS environment:

roscore

Successfully opened as shown in the figure below:
Insert picture description here

The version of ROS is shown above, as well as some nodes, terminal numbers, and so on.

(2) Open a new terminal (Termial) and enter the following command to pop up a small turtle window:

rosrun turtlesim turtlesim_node

Insert picture description here

(3) After the LOGO of a little turtle appears, open a new terminal (Termial) and enter the following command

rosrun turtlesim turtle_teleop_key

Insert picture description here

Then, use the arrow keys to control the movement of the little turtle: as shown in the figure below
Insert picture description here

(4) Open the new Termial and enter the following command to view the ROS node information:

rosrun rqt_graph rqt_graph

Insert picture description here

If you can go to this step smoothly, the ROS installation is successful.
If you have a problem or error (ERROR) during the installation process, you can leave a message for me, and everyone can communicate with each other.
Note: (New headline number, please pay attention to it: https://www.toutiao.com/i6753408694622355980/ Thank you, your support is my motivation)

————————————————
Copyright statement: This article is the original article of the CSDN blogger " _妖言迷众". It follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link for reprinting. And this statement.
Original link: https://blog.csdn.net/weixin_43159148/article/details/83375218

Guess you like

Origin blog.csdn.net/m0_51233386/article/details/114272677