Ubuntu16.04 installs ROS Kinetic research-level detailed tutorial
1. "Software and Updates" to configure
1.1 Free Software
After the configuration is complete, you can close this window.
1.2 Other Software
First , open "System Settings" -> click "Software&updates" -> click "Other Softwares" -> click the "Add" button in the lower left corner.
In the APT line enter:
deb http://ros.exbot.net/rospackage/ros/ubuntu/ xenial main
2. Add source
2.1 Add via terminal
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
2.2 Enter the key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Note: If the above display link times out, you can use the following method
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116
Or: You can change the above link to: hkp://pgp.mit.edu:80 or hkp://keyserver.ubuntu.com:80. This experiment tried hkp://keyserver.ubuntu.com:80 successfully.
Reference (Author: Rice Husk Special Construction) article.
3. Update software and packages
3.1 Update software list
sudo apt-get update
3.2 Update the installed software to the latest version
sudo apt-get upgrade
4. Install aptitude
Reference (Author: Rice Husk Special Construction) article.
It seems that you can install ROS successfully without installing it, and use it.
sudo apt-get install aptitude
5 Install the full version of ROS kinetic
Note: This version corresponds to Ubuntu 16.04 (Xenial)
5.1 After installing aptitude, you can install it with the following code
sudo aptitude install ros-kinetic-desktop-full
5.2 If aptitude is not installed, you can install it with the following code
sudo apt-get install ros-kinetic-desktop-full
6 Initialize rosdep
6.1 sudo rosdep init
sudo rosdep init
Success will show:
6.1.1 Problem 1 occurs
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
Solution 1:
sudo gedit /etc/hosts
Add at the end of the file
151.101.84.133 raw.githubusercontent.com
or
199.232.28.133 raw.githubusercontent.com
Note: If it still doesn’t work, please refer to
the rosdep init error solution. You can refer to Baidu’s experience
for the ip query of the raw.githubusercontent.com website in the middle step , but it is a bit troublesome under Windows. How to check the IP address of a website
6.1.2 Problem 2
ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize
Solution:
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
6.2 rosdep update
rosdep update
Success will show:
6.2.1 Question 1
$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Add distro “ardent”
ERROR: error loading sources list:
<urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/ardent/distribution.yaml)>
6.2.2 Solution 1
An error occurs when ubuntu installs ROS and proceeds to rosdep update
sudo gedit /etc/resolv.conf
Comment out the original nameserver line and add the following two lines:
nameserver 8.8.8.8 #google domain name server
nameserver 8.8.4.4 #google domain name server
Save and exit, execute
sudo apt-get update
Re-execute
rosdep update
If you think of the successful display in 6.2, it is successful.
References
If the problem is still not resolved, use the following method (try it works)
6.2.3 Other solutions
(1) Turn on the wifi to connect to the hotspot of the mobile phone (if you can’t connect to the wifi, see the next step (2)).
If you can’t do it on the desktop computer, you can buy a wifi receiver (wipe your sweat). Used on the Ubuntu system, I bought this wifi receiver myself
(2) Install a software
and open the link to download: Ubuntu 14.04 64 bit
backup link
(3) Then open
Search Your Computer in the upper left corner, search for
(4) Execution
sudo apt-get update
sudo rosdep init
rosdep update
So far, mine is successful, otherwise, after repeatedly opening the software and connecting, try again several times. I feel that this is the easiest case where the above cannot be solved.
If it still doesn’t work, there is another solution that you can look at, the link is as follows (I haven’t tried it myself, it’s just for reference):
Install ROS, rosdep update error occurred during initialization. Solution:
An error occurred when installing ROS on ubuntu and proceeding to rosdep update, such as ERROR : unable to process source
7 Add ros environment variables
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
8 Installation dependencies
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
9 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
(2) Open a new terminal (Termial), enter the following command, and a small turtle window will pop up:
rosrun turtlesim turtlesim_node
(3) Open a new terminal (Termial) and enter the following command
rosrun turtlesim turtle_teleop_key
Then, use the arrow keys to control the movement of the little turtle.
(4) Open a new terminal and enter the following command to view the ROS node information
rosrun rqt_graph rqt_graph
end. . .
References:
Detailed process of installing ROS Kinetic on Ubuntu 16.04
Installing ROS in ubuntu 16.04 environment Installing ROS in
Ubuntu 18.04 Installing ROS Melodic
Installing ROS, rosdep update error occurred during initialization Solution Solution
When installing ROS on ubuntu and proceeding to rosdep update, an error occurred, such as ERROR: unable to process source
rosdep init error solution