Author: Li Manman
Source: WeChat public account [The road is long]
Preface: I always think it is very mysterious. What is it? Just the name alone makes me hesitate. But ROS is inextricably linked to , as a data bridge between simulation software and intelligent driving, ROS is unavoidable, so I still have to bite the bullet and take a look. Then I will explain it to you in plain language, and it would be best if I could give you two small examples, which would be a great merit.
This article will help you understand the core concepts of ROS and lay a solid foundation for the subsequent study of "using the ROS framework to integrate controlled algorithms into the autonomous driving simulation platform."
1. Introduction to ROS
ROS (Robot Operating System) is an open source framework that connects loose components and provides an architecture for them. Although ROS is called an operating system, it must be installed on an operating system such as this one to run. Its function is only to connect the real operating system (such as Linux) and the ROS application developed by the user (such as the perception, planning, decision-making and other modules of autonomous driving), so it can also be regarded as a middleware, building a communication bridge between ROS-based applications.
So, to put it simply, ROS is a distributed communication framework that helps program processes communicate more conveniently.
In order to understand the application of ROS more vividly, here is a very good one found from other platforms for everyone to learn.
2. Core concepts of ROS
Before formally learning ROS, let's first introduce several features of ROS, namely the meta-operating system, distributed communication mechanism, loosely coupled software framework, rich open source function library, etc., to help everyone establish some intuitive understanding.
ROS is a meta-operating system in the field of robotics. In other words, it is not a real operating system, and 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, or software framework, running on Ubuntu/Linux, but it provides operating system-like functions such as hardware abstraction, function call, and process management. It also provides functions and tools for acquisition, compilation, 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 in the ROS mechanism is responsible for managing and scheduling the communication process between each node, and also provides a service for configuring the global network.
ROS is a loosely coupled software framework that uses a distributed communication mechanism to achieve 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.
3. From ROS1 to
In 2007, a robot company called Willow Garage released ROS. ROS combines many advantages such as open source, free, high reuse, low coupling, and rich tools. Once launched, it quickly attracted a large number of researchers and suppliers to join, forming a stable and diverse robot ecology. ROS has naturally become the mainstream software framework in the field of robotics and is still popular today.
In the more than ten years since the birth of ROS, robot-related software, hardware and ROS community have undergone tremendous changes. In addition, the original ROS has some inherent design defects. Under the superposition of various internal and external factors, the old ROS has become incapable of meeting the requirements in many application scenarios. In this context, the official launched a new generation of robot operating system in 2017 - ROS2 (different from the old ROS, i.e. ROS1). ROS2 is based on a new design framework, retaining the advantages of ROS1 and improving its defects to adapt to the new needs of the new era.
ROS2 is a new generation of robot operating system, not just ROS1 with enhanced functions.
So, let's just learn ROS2 directly.
4. ROS Release
ROS was originally developed based on the Ubuntu system. The release version names of ROS also follow the same rules as Ubuntu, that is, the version name consists of two English words with the same first letter, and the first letter of the version is selected in ascending alphabetical order. The following list is a brief description of the different release versions of ROS2.
Distributions | release date | Maintenance end date |
---|---|---|
Iron Irwini | May 23, 2023 | November 2024 |
Iron Irwini | May 23, 2023 | November 2024 |
Humble Hawksbill | May 23, 2022 | May 2027 |
Galtic Geochelone | May 23, 2021 | November 2022 |
Foxy Fitzroy | June 5, 2020 | May 2023 |
Eloquent Elus | November 22, 2019 | November 2020 |
Dashing Diademata | May 31, 2019 | May 2021 |
Crystal Clemmys | December 14, 2018 | December 2019 |
Bouncy Bolson | July 2, 2018 | July 2019 |
Ardent Apalone | December 8, 2017 | December 2018 |
5. How to learn ROS
In order to learn and use ROS well, you need to do a lot of practical operations. Therefore, after quickly understanding the core concepts and paradigms of ROS, you need to combine a lot of practical projects to deeply understand ROS. The main learning resources of ROS are as follows:
Official website: www.ros.org
Source code: github.com
Wiki: wiki.ros.org
: answe.ros.org
6. ROS system architecture
Since the architecture of ROS is relatively complex, in order to make it easier to understand the various concepts encountered later, we will first discuss the system architecture of ROS so that everyone can have a comprehensive grasp 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 .
6.1. Understanding ROS architecture from the perspective of computational graphs
The basic unit of executable programs in ROS is called a node. Nodes communicate with each other through a message mechanism, thus forming a network graph, also called a computational graph, as shown in the figure below.
A node is an executable program, also commonly called a process.
Each executable program created in the ROS function package is a ROS node after being started and loaded into the system process, such as node 1, node 2, node 3, etc. in the figure above.
Nodes communicate by sending and receiving messages. The message sending and receiving mechanisms are divided into three types: topic (toc), service (serve), and action (action). For example, in Figure 1-3, nodes 2 and 3, and nodes 2 and 5 use topic communication, nodes 2 and 4 use service communication, and nodes 1 and 2 use action communication. Nodes, topics, services, and actions in the computational graph must have unique names as identifiers.
ROS uses nodes to decouple code and functions, improving the fault tolerance and maintainability of the system. Therefore, it is better to make each node have a specific single function rather than creating a large node that covers everything. If you use the programming node, you need to use the roscpp library provided by ROS; if you use the programming node, you need to use the rospy library provided by ROS.
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.
Messages are the key to forming a computational graph, and include two parts: message mechanism and message type. There are three types of message mechanisms: topic, service, and action. The data transmitted in each message mechanism has a specific data type (i.e., message type). Message types can be divided into topic message type, service message type, and action message type.
A data packet (rosbag) is a file in ROS that is specifically used to save and replay data in a topic. Some data that is difficult to collect can be recorded using a data packet, and then replayed repeatedly to debug the algorithm performance.
The parameter server can provide easy-to-modify parameters for nodes in the entire ROS network. Parameters can be considered as global variables in the node that can be modified externally. There are 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 state when the node is running, such as PID control parameters in the node.
6.2. Understanding ROS architecture from the perspective of the file system
Different components of a ROS program should be placed in different folders. These folders organize files according to different functions. This is the file system structure of ROS, as shown in the figure below.
A workspace is a folder that contains function packages, compiled packages, and compiled executable files. Users can create multiple workspaces according to their needs and develop function packages for different purposes in each workspace. In the figure above, we created a workspace named catkin_ws, which contains three folders: src, build, and devel.
The src folder contains each function package and the CMake configuration file CMakeLists.txt that configures the function package. 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 the role of configuration compilation.
Previous article:Pangu is here! China's first bridge-type explosion-proof heavy-load handling robot rolls off the production line
Next article:Transmission efficiency test of precision reducer for industrial robot
- Popular Resources
- Popular amplifiers
- Using IMU to enhance robot positioning: a fundamental technology for accurate navigation
- Researchers develop self-learning robot that can clean washbasins like humans
- Universal Robots launches UR AI Accelerator to inject new AI power into collaborative robots
- The first batch of national standards for embodied intelligence of humanoid robots were released: divided into 4 levels according to limb movement, upper limb operation, etc.
- New chapter in payload: Universal Robots’ new generation UR20 and UR30 have upgraded performance
- Humanoid robots drive the demand for frameless torque motors, and manufacturers are actively deploying
- MiR Launches New Fleet Management Software MiR Fleet Enterprise, Setting New Standards in Scalability and Cybersecurity for Autonomous Mobile Robots
- Nidec Drive Technology produces harmonic reducers for the first time in China, growing together with the Chinese robotics industry
- DC motor driver chip, low voltage, high current, single full-bridge driver - Ruimeng MS31211
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- What are the main differences between DSP's C language and host's C language?
- renesas Renesas R-CAR Series Guide
- Prize-winning survey | Learn about [Semiconductor materials and device testing knowledge] (Materials Science) with Tektronix
- The problem of NTC temperature detection circuit is shown in the figure
- "Operational Amplifier Parameter Analysis and LTspice Application Simulation" Reading Notes 1 - Details Determine Success or Failure
- 02.GD32L233C-START template project & WS2812B driver implementation GPIO
- Multifunctional terminal software MobaXterm upgraded to 20.0
- Classic! "Introduction to Circuit Analysis (12th Edition)"
- [Raspberry Pi Pico Review] 2. Win7 system cannot install Raspberry Pi Pico serial port driver, but it is successful to replace Win10
- Thank you + family and friends And EEWORLD