• notice
  • Congratulations on the launch of the Sought Tech site

Installation and use of ROS

One, apt installation

Install

Speaking of ROS, you may all know more or less now. Nowadays, the rapid development of robots in the world is like the computer industry a few decades ago. Robots are gradually entering thousands of households, ranging from industrial robots to small service robots for home use. Robots based on the development of computer technology are also springing up. Robots can be mainly divided into two major directions: the hardware layer and the software layer. Each type of robot needs to write functions that meet the needs of users according to the actual hardware conditions. Gradually, people find that the reuse rate of such robot codes is very low, which greatly hinders the development of robots. Therefore, ROS is to provide support for the code reuse of robots in the process of research and development. ROS is the abbreviation of Robot Operating System. ROS started in 2007 and was supported by the Stanford AI Robot Project of the Artificial Intelligence Laboratory of Stanford University. ROS was developed under. Since the first version of ROS Box Turtle released on March 2, 2010 (as of August 2018), there have been 12 versions. The best ROS compatibility is the Ubuntu operating system. Three of the long-term supported versions and the corresponding three LTS versions of Ubuntu are as follows:

ROS version Release time End of support time Corresponding Ubuntu version

ROS Indigo Jul 22, 2014 Apr 2019 Ubuntu 14.04

ROS Kinetic May 23, 2016 April 2021 Ubuntu 16.04

ROS Melodic May 23, 2018 April 2023 Ubuntu 18.04

For  more information the support plans listed at http://wiki.ros.org/Distributions .

 

Python, C++, JAVA and other programming languages supported by ROS. Because ROS mainly supports the Ubuntu operating system, this tutorial is also installed under the Ubuntu system. Here, it is recommended to install the Ubuntu system or the Windows dual system, which can make it easier to learn ROS. Next, I will explain the installation of ROS in detail.

 

(1) Configured Ubuntu system

In the "Software and Updates" interface, open it and configure it as shown below (make sure your "restricted", "universe," and "multiverse." are ticked), preferably set the source to China .

 

Type sudo gedit /etc/apt/sources.list

Open sources.list and copy the following content into it, then save and exit.

copy code

deb-src http: // archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties   deb http: // mirrors.aliyun.com/ubuntu/ xenial main restricted   deb-src http: // mirrors.aliyun. com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties   deb http: // mirrors.aliyun.com/ubuntu/ xenial-updates main restricted   deb-src http: // mirrors.aliyun.com/ubuntu/ xenial- updates main restricted multiverse universe #Added by software-properties   deb http: // mirrors.aliyun.com/ubuntu/ xenial universe   deb http: //mirrors.aliyun.com/ubuntu/ xenial-updates universe   deb http: // mirrors.aliyun.com/ubuntu/ xenial multiverse   deb http: // mirrors.aliyun.com/ubuntu/ xenial-updates multiverse   deb http: // mirrors .aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse   deb-src http: // mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties   deb http: // archive.canonical .com/ubuntu xenial partner   deb-src http: // archive.canonical.com/ubuntu xenial partner   deb http: //mirrors.aliyun.com/ubuntu/ xenial-security main restricted   deb-src http: // mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties   deb http: // mirrors.aliyun. com/ubuntu/ xenial-security universe   deb http: // mirrors.aliyun.com/ubuntu/ xenial-security multiverse

copy code

 

(2) Open the terminal, the shortcut key is to press Ctrl + Alt + T to configure sources.list

The setup computer can receive software from the ROS.org website.

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 the secret key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

set result

xxxx@cheetah-Z2-R:~$ sudo apt-key adv --keyserver hkp: // ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 Executing: /tmp/apt-key-gpghome. VQHtUrQqXU/gpg. 1 . sh --keyserver hkp: // ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 gpg: key 5523BAEEB01FA116: public key "ROS Builder <[email protected]> " importedgpg: Total processed: 1 gpg: Imported: 1 xxxx@cheetah -Z2-R:~$

The above errors and similar errors of "E: Unable to locate the package ros-melodic-desktop-full" are caused by the incompatibility of the ROS version. Each different ubuntu system corresponds to a different ROS version. If it is installed incorrectly The above problems will occur. In the Ubuntu18.04.1 environment, the melodic version can be installed. For the installation tutorial, please refer to the official website installation tutorial. ROS has different types of Melodic, Lunar, and Kinetic corresponding to different ubuntu versions.
Melodic mainly corresponds to: Ubuntu Artful (17.10), Bionic (18.04 LTS) and Debian Stretch
Kinetic mainly correspond to: Ubuntu Wily (15.10) and Ubuntu Xenial (16.04 LTS).
During the installation process, you need to select the corresponding ROS type to install according to your ubuntu system version. The specific ROS type can be viewed on the official website branch type introduction.
Solution:

Open Software and Updates -> Other Software, find the ros software source, select it and click Edit, and change the distribution from disco to bionic ( Ubuntu18 ) or xenial .

 PS: It is best to install it in a corresponding way, otherwise there will be a lot of trouble in the back.

 

 

(4) Installation

Now the reader has put the address of the ROS repository in the code list, and then updated the package.

Redirect ROS server

sudo apt-get update && sudo apt-get upgrade -y

 But if the ubuntu version is not correct, the following error may be reported

Reading package list... done                                                                          E: The repository "http://packages.ros.org/ros/ubuntu disco Release" has no Release file. N: This source cannot be safely updated with, so this source is disabled by default.N: See the apt -secure( 8 ) manual for details on repository creation and user configuration... cheetah@cheetah -Z2-R:~$

 

Then we can install ROS, but the problem appears again, ROS kinetic also has many versions, such as industrial version, basic version, advanced version, deluxe version, supreme deluxe..

ROS, then install the supreme deluxe full-featured version, the instructions are as follows

s udo apt-get install ros-kinetic-desktop-full

 or other versions of ros etc.

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

but error again

The following packages have unmet dependencies:

copy code

The following packages have unmet dependencies: 
 ros-melodic-desktop-full : Dependency: ros-melodic-desktop but it will not be installed
                            Dependency: ros-melodic-perception but it will not be installed
                            Dependency: ros- melodic-simulators but it won't be installed
                            dependencies: ros-melodic-urdf-sim-tutorial but it won't be installed
E: can't fix errors because you asked some packages to stay as they are, that is they break the package dependencies.
cheetah@cheetah-Z2-R:~$

copy code

The solution is:sudo apt-get install xxx(Missing things reported above)


Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+