Home  >  Article  >  Operation and Maintenance  >  What version of linux is ros?

What version of linux is ros?

青灯夜游
青灯夜游Original
2023-04-12 16:13:061286browse

ros is a linux distribution version. The full name of ROS is Robot Operating System, which is translated as robot operating system; it is based on the Linux kernel and can only run under Linux. ROS provides some standard operating system services, such as hardware abstraction, underlying device control, common function implementation, inter-process messaging, and packet management. ROS can be divided into two layers. The lower layer is the operating system layer described above, and the higher layer is the various software packages contributed by the broad user base to implement different functions, such as positioning mapping, action planning, perception, etc.

What version of linux is ros?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

ROS definition introduction

ROS stands for Robot Operating System, which is translated as robot operating system. Based on the Linux kernel, it currently only runs under Linux.

ROS designers describe ROS as "ROS = Plumbing Tools Capabilities Ecosystem", that is, ROS is a collection of communication mechanisms, tool software packages, high-level robot skills, and robot ecosystems.

As the name suggests, ROS is a system. It is similar to the ordinary operating system we use. ROS encapsulates the underlying robot hardware. In other words, the various underlying parameters contained in different robots are the same in the eyes of those who develop using ROS. It should also be mentioned here that ROS currently does not have a visual interface. The Windows and Linux we use can directly see and operate the image interface because they have a visual interface, but ROS does not. What we call an operating system does not necessarily have to have a visual interface. If you are interested, you can take a look at the earliest operating systems, which only had command lines and no colorful interfaces.

ROS provides some standard operating system services, such as hardware abstraction, underlying device control, common function implementation, inter-process messaging, and data packet management. ROS is based on a graph architecture, so that processes on different nodes can receive, publish, and aggregate various information (such as sensing, control, status, planning, etc.).

ROS can be divided into two layers. The lower layer is the operating system layer described above, and the higher layer is the various software packages contributed by the broad user base to implement different functions, such as positioning mapping, action planning, perception, simulation, etc. .

ROS is a polysemous word, and it can also be a communication mechanism. In ROS development, nodes are used to represent applications, and a node is an executable program. Communication between nodes is through ROS. ROS manages each node through the node manager (Master). As for the specific implementation of the principle, we will discuss it later.

In addition, ROS also represents a series of toolkits, algorithms, skills, platforms, ecology, etc. for robot development.

The history of ROS. To put it bluntly, ROS is something that a group of big guys think is better when developing robots (it can be some useful libraries and software, or it can be some ideas, protocols, and standards) that are formed after gathering together. In the development of robots, there is no unified standard for various robots. Every time you develop a robot that you have never seen before, you need to learn a lot of things again, which is very inconvenient. Therefore, the big guys draw lessons from the operating system to create I thought why not we can also build a system for robots to encapsulate the bottom layer? Thus, ROS was born. After years of polishing, ROS has become more and more perfect, and more and more people are using it.

ROS Function

If you want to ask me what ROS does, then you only need to know one sentence. ROS is used for robot or robot arm development.

In the history of robot development, standardization work has still not been done in place. Different robots use different systems, programs, etc., which makes it very difficult to develop as long as they are cross-platform. In order to solve such problems, ROS was born. ROS can make the underlying hardware transparent to developers through encapsulation, greatly reducing the difficulty of cross-platform development.

The reason why we choose ROS is that everyone should understand what has been said above. It is nothing more than that it is used by many people and has a wide popularity. ROS contains a lot of fields, data, functions, content, knowledge, etc. Do you want to compile your own database without using it?

1. Performance characteristics of ROS

Before formally learning ROS, let’s first introduce several characteristics of ROS, namely meta-operating system, distributed communication mechanism, and loose coupling. Software frameworks, rich open source function libraries, etc., to help you build some perceptual understanding.

ROS is a meta-operating system in the field of robotics. In other words, it is not an operating system in the true sense. Its underlying task scheduling, compilation, device drivers, etc. are still completed by its native operating system Ubuntu Linux.

ROS is actually a sub-operating system running on Ubuntu Linux, or a software framework, but it provides operating system-like functions such as hardware abstraction, function calling, and process management. It also provides Functions and tools for fetching, compiling, and cross-platform.

The core idea of ​​ROS is to make the software functions of the robot into nodes, and the nodes communicate by sending messages to each other. These nodes can be deployed on the same host, on different hosts, or even on the Internet. The master node (master) in the ROS network communication mechanism is responsible for managing and scheduling the communication process between various nodes in the network, and also provides a service for configuring global parameters in the network.

ROS is a loosely coupled software framework that uses a distributed communication mechanism to realize process communication between nodes. The software code of ROS is organized in a loosely coupled manner, with a flexible development process and easy management and maintenance.

ROS has a rich open source function library. ROS is open source software based on the BSD (Berkeley Software Distribution) protocol, which allows anyone to modify, reuse, redistribute, and use it in commercial and closed-source products. Using ROS, you can quickly build your own robot prototype.

2. ROS distribution version

Similar to the Linux distribution version, the ROS distribution version has a series of commonly used function packages built-in, that is, the ROS system is packaged and installed into the native system. . ROS was originally developed based on the Ubuntu system. The release version name of ROS also adopts the same rules as Ubuntu, that is, the version name consists of two English words with the same first letter, and the first letters of the version are selected in ascending order of the alphabet, Figure 1- 1 shows some major releases of ROS.

What version of linux is ros?
Figure 1-1 Major versions of ROS

ROS system architecture

After installing ROS, many friends should be eager to start writing programs immediately. Since the architecture of ROS is relatively complex, in order to easily understand the various concepts encountered later, let's first discuss the system architecture of ROS so that everyone can have a comprehensive understanding of the various concepts in ROS. According to the official statement, the ROS architecture can be understood from the perspectives of Computational graph, File system and Open source community.

1. Understand the ROS architecture from the perspective of computational graph

The basic unit of executable programs in ROS is called node (node), between nodes Communication is carried out through the message mechanism, which forms a network diagram, also called a calculation diagram, as shown in Figure 1-3.

What version of linux is ros?
Figure 1-3 ROS calculation graph structure

Nodes are executable programs, usually also called processes. Each executable program created in the ROS function package becomes a ROS node after being started and loaded into the system process, such as node 1, node 2, node 3, etc. in Figure 1-3.

Nodes communicate by sending and receiving messages. The message sending and receiving mechanism is divided into topic(topic), service(service) and action( action). In Figure 1-3, node 2 and node 3, node 2 and node 5 use topic communication, node 2 and node 4 use service communication, and node 1 and node 2 use action communication. Nodes, topics, services, and actions in the calculation graph must have unique names as identifiers.

ROS uses nodes to decouple code and functions, improving the fault tolerance and maintainability of the system. So it's better to have each node serve a specific single function rather than create one huge, all-encompassing node. If you use C to write nodes, you need to use the roscpp library provided by ROS; if you use Python to write nodes, you need to use the rospy library provided by ROS.

Messages are the key to the calculation graph, including message mechanism and message type. There are three types of message mechanisms: topic, service and action. The data transferred in each message mechanism has a specific data type (i.e. message type). Message types can be divided into topic message types, service message types and action message types. The message mechanism and message types will be explained in Section 1.5.

Data package (rosbag) is a file in ROS specially used to save and playback the data in the topic. Some sensor data that is difficult to collect can be recorded in data packages and then played back repeatedly. Perform algorithm performance debugging.

The parameter server can provide easily modified parameters for nodes in the entire ROS network. Parameters can be considered as global variables in the node that can be modified externally, including static parameters and dynamic parameters. Static parameters are generally used to set the node working mode when the node starts; dynamic parameters can be used to dynamically configure the node or change the node working status when the node is running, such as PID control parameters in the motor control node.

The master node is responsible for the scheduling and management of the communication process between each node. Therefore, the master node must be started first and can be started through the roscore command.

2. Understand the ROS architecture from the perspective of the file system

Different components of the ROS program should be placed in different folders. These folders store files according to different functions. Organize, this is the file system structure of ROS, as shown in Figure 1-4.

What version of linux is ros?
Figure 1-4 ROS file system structure

The workspace is a package that contains function packages, compilation packages and In the folder of the compiled executable file, users can create multiple workspaces according to their own needs and develop functional packages for different purposes in each workspace. In Figure 1-4, we created a workspace named catkin_ws, which contains three folders: src, build, and devel.

  • src folderPlace each function package and the CMake configuration file CMakeLists.txt that configures the function package. To explain here, since the source code in ROS is compiled using the catkin tool, and the catkin tool is based on CMake technology, we will see a CMake configuration file CMakeLists.txt in the src source file space and each function package. This file plays a role Configure the role of compilation.
  • build folderPlace the cache, configuration, intermediate files, etc. generated when compiling CMake and catkin function packages.
  • devel folderPlace compiled executable programs. These executable programs can be run directly without installation. Once the function package source code is compiled and tested, these compiled executable files can be directly exported and shared with other developers.

Function package is the basic form of software organization in ROS. It has the minimum structure and minimum content to create a ROS program. It contains ROS node source code, scripts, configuration files, etc.

i. CMakeLists.txt is the function package configuration file, which is used to compile the compilation configuration of Cmake function package.

ii. package.xml is a function package manifest file. It uses the XML tag format to mark various related information of the function package, such as the name of the package, developer information, dependencies, etc., mainly to make the function Package installation and distribution are easier.

iii. include/ is the function package header file directory, and the *.h header files included in the function package program can be placed here. The reason why the include directory also adds a first-level path is to better distinguish between self-defined header files and system standard header files. Replace with the name of the actual function package. However, this folder is not necessary. For example, some programs do not have header files.

iv. The three folders msg, srv and action are used to store definition files of non-standard topic messages, service messages and action messages respectively. ROS supports users to customize the message types used in the message communication process. These custom messages are not necessary, as the program only uses standard message types.

v. The scripts directory stores Bash, Python and other script files and is not necessary.

vi. The launch directory stores the startup files of the nodes. The *.launch file is used to start one or more nodes. It is very useful in large projects with multiple nodes and is not necessary.

vii. The src directory stores the source code corresponding to the function package node. There can be multiple node programs in a function package to complete different functions, and each node program can be run independently. The src directory here stores the source code of these node programs. You can create folders and files as needed to organize the source code. The source code can be written in C, Python, etc.

3. Understand the ROS architecture from the perspective of the open source community

ROS is open source software. Each independent online community shares and contributes software and tutorials, forming a powerful ROS open source Community, as shown in Figure 1-5.

What version of linux is ros?
Figure 1-5 Open source community structure of ROS

The development of ROS relies on open source and shared software, and these codes are provided by Sharing and publishing by different organizations, such as GitHub source code sharing, Ubuntu software warehouse release, third-party libraries, etc. The official wiki of ROS is an important document discussion community, where you can easily publish and modify corresponding document pages. The ROS answer homepage contains a large number of questions and answers from ROS developers, and discussions on various issues encountered in ROS development are very active.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What version of linux is ros?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn