1.ROS introduction

ROS wiki : http://wiki.ros.org/

ROS (Robot Operating System, referred to as "ROS") is an open source operating system suitable for robots. It provides the services that an operating system should have, including hardware abstraction, low-level device control, implementation of common functions, inter-process message passing, and package management. It also provides the tools and library functions needed to obtain, compile, write, and run code across computers.

The main goal of ROS is to provide support for code reuse for robotics research and development. ROS is a framework of distributed processes (also known as "nodes") that are encapsulated in packages and function packages that are easy to share and publish. ROS also supports a federated system similar to a code repository, which can also enable project collaboration and release. This design allows the development and implementation of a project to be completely independent from the file system to the user interface (not restricted by ROS). At the same time, all projects can be integrated by ROS basic tools.

1.1 Main features of ROS

(1) Distributed architecture (each working process is regarded as a node and is managed uniformly using the node manager),

(2) Multi-language support (such as C++, Python, etc.),

(3) Good scalability (you can write one node, or organize many nodes into a larger project through roslaunch),

(4) Open source code (ROS follows the BSD protocol and is completely free for individual and commercial applications and modifications).

1.2 Overall architecture of ROS

Open source community level: mainly includes developer knowledge, code, and algorithm sharing.

File system level: used to describe the code and executable programs that can be found on the hard disk.

Computational graph level: reflects the communication between processes and processes and systems.

1.2.1 Calculation graph level

image-20210827145606482

1.2.2 File system level

File system level
Comprehensive functional package
Functional package
Function package list
Message
Service
Code
Others

Dependencies can be configured between function packages. If function package A depends on function package B, then when building the system in ROS, B must be built earlier than A, and A can use the header files and library files in B.

The file system level concepts are as follows:

1.2.3 Open source community level

1.3 Communication mechanism

1.3.1、Topic

The asynchronous publish-subscribe communication mode is widely used in ros. Topic is generally used for one-way, message flow communication. Topics generally have strong type definitions: a topic of one type can only accept/send messages of a specific data type (message type). Publisher is not required to have type consistency, but when accepting, subscriber will check the md5 of the type and report an error.

image-20210831162509791

1.3.2、Service

Service is used to handle synchronous communication in ros communication, using server/client semantics. Each service type has two parts: request and response. For the server in the service, ros will not check the name conflict. Only the last registered server will take effect and establish a connection with the client.

image-20210831163032489

1.3.3、Action

Actions are composed of multiple topics and are used to define tasks. Task definitions include goals (Goal), task execution process status feedback (Feedback), and results (Result). Compiling action will automatically generate 7 structures: Action, ActionGoal, ActionFeedback, ActionResult, Goal, Feedback, and Result structures.

image-20210830102834443

Features of Action:

Action interface:

Comparison of communication mode features

FeaturesTopicServiceAction
Response mechanismNoneResult responseProgress response, result response
SynchronicityAsynchronousSynchronousAsynchronous
Communication modelPublisherSubscriberClientServerClientServer
Node correspondenceMany to manyMany(Client)to one(Server)Many(Client)to one(Server)

1.4 Common components

launch startup file; TF coordinate transformation; Rviz; Gazebo; QT toolbox; Navigation; MoveIt!

launch:Launch File is a way to start multiple nodes at the same time in ROS.It can also automatically start the ROS Master node manager, and can implement various configurations of each node, providing great convenience for the operation of multiple nodes.

TF coordinate transformation: There are often a large number of component elements in the robot body and the robot's working environment. The positions and postures of different components are involved in robot design and robot applications. TF is a function package that allows users to track multiple coordinate systems over time , which uses a tree data structure to buffer and maintain coordinate transformation relationships between multiple coordinate systems based on time, which can help developers complete coordinate transformations such as points and vectors between coordinate systems at any time.

QT toolbox: In order to facilitate visual debugging and display, ROS provides a Qt-based background graphics tool suite - rqt_common_plugins,It contains many practical tools: log output tool (rqt_console), calculation graph visualization tool (rqt_graph), data drawing tool (rqt_plot), parameter dynamic configuration tool (rqt_reconfigure)

Rviz: rviz is a 3D visualization tool that is well compatible with various robot platforms based on the ROS software framework. In rviz, you can use XML to describe the size, quality, position, material, joints and other attributes of any physical objects such as robots and surrounding objects, and present them in the interface. At the same time, rviz can also display robot sensor information, robot motion status, changes in the surrounding environment, etc. in a graphical manner in real time.

Gazebo: Gazebo is a powerful three-dimensional physics simulation platform with a powerful physics engine, high-quality graphics rendering, convenient programming and graphics interfaces, and most importantly, it is open source and free. Although the robot model in Gazebo is the same as the model used by rviz, the physical properties of the robot and the surrounding environment, such as mass, friction coefficient, elastic coefficient, etc., need to be added to the model. The robot's sensor information can also be added to the simulation environment in the form of plug-ins and displayed in a visual manner.

Navigation: Navigation is a two-dimensional navigation function package of ROS. Simply put, it calculates safe and reliable robot speed control instructions through the navigation algorithm based on the information flow of the input odometer and other sensors and the global position of the robot.

Moveit:Moveit!Function package is the most commonly used tool package, mainly used for trajectory planning. Move it! The configuration assistant is used to configure some files that need to be used in planning, which is very important.

1.5 Release version

Reference link:http://wiki.ros.org/Distributions

ROS 1 Distribution

ROS distribution refers to the version of the ROS software package.The concept of it and Linux distribution version (such as Ubuntu) similar.The purpose of a ROS distribution is to allow developers to work with a relatively stable codebase until they are ready to upgrade everything.Therefore, after each release version is launched, ROS developers usually only fix the bugs in this version and provide a small number of improvements to the core software package.As of October 2019, the version names, release times and version life cycles of major ROS releases are as shown in the following table:

Version nameRelease dateVersion lifecycleOperating system platform
ROS Noetic NinjemysMay 2020May 2023Ubuntu 20.04
ROS Melodic MoreniaMay 23, 2018May 2023Ubuntu 17.10, Ubuntu 18.04, Debian 9, Windows 10
ROS Lunar LoggerheadMay 23, 2017May 2019Ubuntu 16.04, Ubuntu 16.10, Ubuntu 17.04,Debian 9
ROS Kinetic KameMay 23, 2016April 2021Ubuntu 15.10, Ubuntu 16.04, Debian 8
ROS Jade TurtleMay 23, 2015May 2017Ubuntu 14.04, Ubuntu 14.10, Ubuntu 15.04
ROS Indigo IglooJuly 22, 2014April 2019Ubuntu 13.04, Ubuntu 14.04
ROS Hydro MedusaSeptember 4, 2013May 2015Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04
ROS Groovy GalapagosDecember 31, 2012July 2014Ubuntu 11.10, Ubuntu 12.04, Ubuntu 12.10
ROS Fuerte TurtleApril 23, 2012--Ubuntu 10.04, Ubuntu 11.10, Ubuntu 12.04
ROS Electric EmysAugust 30, 2011--Ubuntu 10.04, Ubuntu 10.10, Ubuntu 11.04, Ubuntu 11.10
ROS DiamondbackMarch 2, 2011--Ubuntu 10.04, Ubuntu 10.10, Ubuntu 11.04
ROS C TurtleAugust 2, 2010--Ubuntu 9.04, Ubuntu 9.10, Ubuntu 10.04, Ubuntu 10.10
ROS Box TurtleMarch 2, 2010--Ubuntu 8.04, Ubuntu 9.04, Ubuntu 9.10, Ubuntu 10.04