Understanding ROS
Overview
ROS is an open-source meta-operating system for robots. It provides services that are expected of an operating system, including hardware abstraction, low-level device control, implementation of commonly used functionality, inter-process communication, and package management. It also provides tools and libraries needed to obtain, build, write, and run code across multiple computers.
The ROS architecture is a processing architecture that uses the ROS communication module to implement a loosely coupled, P2P network connection between modules. It performs several types of communication, including:
- Synchronous RPC communication based on services
- Asynchronous data stream communication based on topics, and data storage on the parameter server
Since the beginning of ROS in 2007, with the rapid development of robotics, the core ideas and basic software packages of ROS have been gradually improved and different ROS distributions have been released. The following table lists the current and historical ROS distributions. The rows marked in green are the currently supported distributions.
Although ROS is still a powerful tool for development in the robotics field, it has gradually exposed many problems due to its limitations in the initial design. For example, the real-time performance is poor, the system overhead is high, the support for Python 3 is not user-friendly, and there is no encryption mechanism, resulting in low security. Many developers and research institutes have made improvements to the limitations of ROS. However, these improvements in partial functions often fail to improve the overall performance. At ROSCon 2014, the design architecture of the next-generation ROS (Next-generation ROS: Building on DDS) was officially released. On August 31, 2015, the first alpha version of ROS 2.0 was released, and then different distributions were released. The following table lists the current and historical ROS 2 distributions. The rows marked in green are the currently supported distributions.
Architecture
The following figure shows the overall architecture of ROS:
- OS layer
- ROS 1 is mainly built on Linux. ROS 2 supports more systems, including Linux, Windows, macOS, RTOS, and even bare metal without an OS.
- Middleware
- The most important concept in ROS is the "node" based on the publish/subscribe model. This allows developers to develop low-coupling functional modules in parallel and facilitates secondary reuse. The communication system of ROS 1 is based on TCPROS/UDPROS, while that of ROS 2 is based on DDS. DDS is a standard solution for data publishing and subscription in distributed real-time systems. The next section will provide more details. ROS 2 provides the DDS abstraction layer internally, so users do not need to pay attention to the DDS provider at the bottom layer.
- In the ROS 1 architecture, Nodelet and TCPROS/UDPROS are parallel layers, which provide a more optimized data transmission mode for multiple nodes in the same process. This data transmission mode is also retained in ROS 2, but it is renamed as "Intra-process" and is also independent of DDS.
- Application layer
- ROS 1 strongly depends on the ROS Master. Once the Master breaks down, the entire system will be in a dilemma. However, from the ROS 2 architecture on the right, we can find that the Master, which was previously a concern, has finally disappeared. Nodes use a discovery mechanism called "Discovery" to obtain information about each other.


