1. Introduction to ROS2#
1.1. What is ROS2?#
Unlike its name suggests, Robot Operating System 2 (ROS2), is an open-source middleware framework designed for the development of robotic systems. It is not actually an operating system. ROS2 builds on the concepts of ROS1, but also brings significant improvements in flexibility, performance, and security. This enables roboticists to design advanced and reliable robotics applications.
ROS was invented in 2007 by a group of engineers and researchers at Stanford University and Willow Garage to address the challenges of modern robotics, such as scalability, real-time control, and multi-robot systems. ROS2 provides tools and libraries to help in building, testing, and deploying complex robotic systems.
1.2. Differences Between ROS1 and ROS2#
ROS2 introduces several enhancements to address some of the limitations of ROS1:
Real-time support: ROS2 has real-time control mechanisms, making it ideal for robotics applications that require precise timing and performance guarantees.
For example, monitoring a drone’s altitude and position to land in a specific spot.
Security: ROS2 comes with built-in support for security features, including secure communication channels and user authentication, a major improvement over ROS1.
Middleware (DDS): ROS2 uses DDS (Data Distribution Service) as its communication backend, which enables seamless communication between nodes in distributed systems.
Multi-platform support: While ROS1 was primarily Linux-based, ROS2 is designed to work on multiple platforms (Linux, Windows, macOS) without relying on external dependencies. However, it seems Linux is the most commonly used and error-free platform.
Component lifecycle management: ROS2 introduces the concept of managed nodes, enabling better control over the lifecycle of system components, from startup to shutdown.
Multi-robot systems: ROS2’s architecture is more suitable for multi-robot coordination, making it easier to build systems with multiple robots collaborating.
1.3. Practical Use Cases for ROS2#
ROS2 has diverse applications in robotics and related fields, making it a powerful tool for building, testing, and deploying a wide range of systems. ROS2 is widely used in the development of autonomous vehicles, industrial robots, healthcare, etc.
At Rensselaer Polytechnic Institute (RPI), ROS2 has been used in several projects. For example, one senior capstone team used ROS2 to develop their aircraft assembly robot. This project utilizes ROS2 nodes and other capabilities to enable functionalities such as arm control, LiDAR sensing, and remote controlled movement.

Aircraft Assembly Robot - Spring 2024 RPI Capstone Team
Aircraft Robot Arm Control Using ROS2 - Spring 2024 RPI Capstone Team
As seen from the examples above, learning ROS2 opens up a world of possibilities for anyone passionate about robotics. Now that we have a better idea of what ROS2 is and its capabilities, the remainder of the book will guide you step-by-step, starting from setting up a ROS2 environment up to using nodes and other ROS2 functionalities.
1.4. Quiz 1: Introduction#
At the end of some pages, you will see interactive quizzes to test for understanding. Feel free to complete these as you progress through the book.