This is a short guide to introduce you to the world of ROS2 programming for Robotics applications. This is the part of the ROS2 learning series that will focus on learning general ROS2 concepts and developing ROS2 programs.
What is ROS?
ROS stands for Robot Operating System. Well, is it an operating system like Ubuntu? No. It is an open-source framework or ecosystem or a Software Development kit that has a set of software libraries and tools to help build scalable robot software and applications. This vast array of software libraries includes interface drivers, algorithms, user interfaces, and many tools to build your robot projects. It simplifies the development process by providing a unified interface for communication between different processes or nodes. ROS development is led by Open Robotics, and it is supported by a huge open-source community, including engineers, developers and hobbyists. It supports all common programming languages such as Python and C++.
ROS is based on a publish-subscribe communication model, where nodes (executables or processes that perform computation) exchange messages (data structures) through topics (data channels). ROS also offers services (request-response interactions), actions (long-running tasks with feedback), and parameters (shared configuration values).
Robot Operating System
ROS1
ROS (now commonly called ROS1) was the first version of Robot Operating System created in 2007 by Willow Garage. ROS1 uses the ROS Master-Slave Architecture (publish - subscribe model) where the master manages all the nodes. A node can be considered as an executable. The nodes must contact the master to communicate with other nodes in the system, making it a central architecture. Thus, the master is a single point of failure in ROS1. The ROS1 version is more widely used today due to its stability and the availability of a wide range of supported packages and plugins. However, the robotics industry has started witnessing huge migrations to ROS2.
ROS2
ROS2 is a complete re-design of the framework, mostly developed from scratch. It is developed to tackle the shortcomings of ROS1, also incorporating the industry needs and standards. ROS2 uses Data Distribution Service (DDS). It provides higher efficiency and reliability, low latency, and scalability, as well as configurable quality of service (QoS) parameters. Unlike the central nature of ROS1, ROS2 relies on a distributed architecture, essentially providing robustness and immunity to single point failures. ROS1 and ROS2 are not fully compatible with each other. Even though ROS2 is a new architecture, it provides a bridge package that can be installed alongside ROS1 to ease porting and migration to ROS2.
ROS1 and ROS2 versions are generally known as distributions (like Ubuntu distributions) and are released periodically with LTS versions being the longest supported versions. The last ROS1 distribution is called Noetic Ninjemys which has an End of Life on May 2025. The latest ROS2 distribution is Iron Irwini with an End of Life on November 2024 and the latest LTS version of ROS2 is Humble Hawksbill with an End of Life on May 2027.
Why choose ROS2 over ROS1
ROS2 which offers more flexibility, functionality, and robustness than ROS2. If you are just starting your ROS development, it is easier to start with ROS2 as it will avoid the need of huge software changes later if you plan to migrate to the latest version. If you are already working with ROS1, starting with ROS2 will be easier as many concepts remain the same. If you already have a code base based in ROS1, switching to ROS2 may represent a lot of work and will be time consuming. The complexity increases with the amount of code base and the influence of ROS on your project. However, the ROS bridge package can provide some flexibility during the migration period. This essentials module will be focused on ROS2.
Application areas
- Industrial robotics systems
- Automotive systems
- Aerospace systems
- Embedded systems
- Biomedical systems
- Computer vision
- Academic research