Introduction to ROS/ROS 2
Author: Wang Yangming of JiKrypton Software and Electronics Center
Preface
ROS is the English abbreviation of Robot Operating System. ROS is a highly flexible software architecture for writing robot software programs. The prototype of ROS originated from the STanford Artificial Intelligence Robot (STAIR) and Personal Robotics (PR) projects at Stanford University.
There are clear differences between the robotics industry and academia on the use of software tools. Since the robot industry does not have huge shipments like consumer electronics, absolutely high technical barriers and closed ecology are very common. In order to improve their technical barriers, these companies often design a complete set of closed software and hardware themselves, so that others (competitors or developers) cannot replace it with their own tools. In academia, in order to reduce the work of reinventing the wheel, students and teachers often embrace the open source community and choose existing tools for development and research. The most well-known is ROS (Robot Operating System).
What is ROS
ROS/ROS 2 is not a piece of software, but a collection of software. Generally we call it a software solution stack. Includes hardware drivers, network modules, communication architecture, robot algorithm implementation, etc. ROS brings all these feature packages under one umbrella so developers don't have to reinvent the wheel.
ROS is not an operating system, but is generally called a meta-operating system, which is a class operating system based on the operating system.
ROS is not a middleware because it implements a variety of functions including perception, navigation, control, motion planning and simulation.
ROS
Historical versions of ROS
ROS version |
release time |
Ubuntu version |
ROS Noetic Ninjemys |
May 23rd, 2020 |
Ubuntu 20.04 (Focal) |
ROS Melodic Morenia |
May 23rd, 2018 |
Ubuntu 18.04 (Bionic) |
ROS Lunar Loggerhead |
May 23rd, 2017 |
Ubuntu 17.04 (Zesty) |
ROS Kinetic Kame |
May 23rd, 2016 |
Ubuntu 16.04 (Xenial) |
ROS Jade Turtle |
May 23rd, 2015 |
Ubuntu 15.04 (Vivid) |
ROS Indigo Igloo |
July 22nd, 2014 |
Ubuntu 14.04 (Trusty) |
ROS Hydro Medusa |
September 4th, 2013 |
Ubuntu 12.04 (Precise) |
ROS Groovy Galapagos |
December 31, 2012 |
Ubuntu 12.04 (Precise) |
ROS Fuerte Turtle |
April 23, 2012 |
Ubuntu 10.04 (Lucid) |
ROS Electric Emys |
August 30, 2011 |
Ubuntu 10.04 (Lucid) |
ROS Diamondback |
March 2, 2011 |
Ubuntu 10.04 (Lucid) |
ROS C Turtle |
August 2, 2010 |
Ubuntu 9.04 (Lucid) |
ROS Box Turtle |
March 2, 2010 |
Ubuntu 8.04 (Hardy) |
Comparison of advantages and disadvantages of ROS
advantage |
shortcoming |
Loosely coupled mechanisms provide a framework |
Communication real-time performance is limited |
Rich robot function library |
System stability does not yet meet industrial-grade requirements |
Huge user base |
No safety precautions |
Free and open source |
Only supports Linux (Ubuntu) |
Convenient data recording, analysis, and simulation tools |
The performance of the core mechanism is not optimized and consumes resources |
Mature cases of ROS
ROS 2
Historical versions of ROS 2
ROS version |
release time |
Ubuntu version |
Humble Hawksbill |
May 23rd, 2022 |
TBD |
Galactic Geochelone |
May 23rd, 2021 |
Ubuntu 20.04 (Focal) |
Foxy Fitzroy |
June 5th, 2020 |
Ubuntu 20.04 (Focal) |
Eloquent Elusor |
November 22nd, 2019 |
Ubuntu 18.04 (Bionic) |
Dashing Diademata |
May 31st, 2019 |
Ubuntu 18.04 (Bionic) |
Crystal Clemmys |
December 14th, 2018 |
Ubuntu 16.04 (Xenial) |
Bouncy Bolson |
July 2nd, 2018 |
Ubuntu 16.04 (Xenial) |
Ardent Apalone |
December 8th, 2017 |
Ubuntu 16.04 (Xenial) |
Real-time and distributed
In ROS 1, each node of the user, whether it is the same device or a different device, must know the IP of the Master node, and all rely on the Master node for communication. Once the Master node fails or the device fails, the entire environment All node functions are lost. Unable to recover. It is precisely because of this that ROS 1 cannot be applied to official products.
ROS 2 introduces a decentralized data communication method based on DDS. Different nodes can communicate through unknown IP, which in turn helps solve the problem of multi-robot systems. And ROS 2 also introduces the Quality of Service mechanism, which ensures good communication effects in some poor network environments by setting different service qualities.
real-time
Taking Fast-RTPS as an example, we can see that the delay in communication between dual devices can be stable below 100μs, and the throughput bandwidth has also reached more than 750Mbit/s. For detailed running score data, please refer to Fast-RTPS vs Cyclone DDS vs OpenSplice DDS , and the communication efficiency within the same device will far exceed this result.
data encryption
ROS 2 introduces the concept of SROS on the basis of DDS. The design document refers to ROS 2 DDS-Security integration , that is, all ROS 2 messages can be encrypted and decrypted, authenticated, authorized control, log and data marked through SROS. control etc. Based on the original design logic of ROS 2, we can even put the key generation and storage of data into the ARM TEE OS to achieve higher security data assurance.
Modern programming language support
Since the initial release of ROS 1 was in 2007, long-term support and support from many development libraries have resulted in many new features of the language not being well applied. For example, for Python, Python 3 was not supported for the first time until the Noetic version released in 2020, and Python 2 stopped supporting it in January 2020. Another example is C++. ROS 1 is implemented based on C++ 03, and the support for C++ 11 is not good, let alone the support for C++ 14 and C++ 17.
ROS 2 fully supports Python 3 and is written based on modern C++. And based on its loose coupling method, it also supports programming languages such as Java and Rust. As shown in the line below the User Application in the figure below, any programming language can be supported as long as the developer is willing .