📝 Robot Operating System 2 (ROS 2)
Description
< What is it? >
Robot Operating System 2 (ROS 2) is an open-source software development kit and middleware ecosystem for robotics applications. Despite its name, it is not a complete operating system. It provides conventions, libraries, tools, and communication mechanisms that let robot software components work together.
- Example: one ROS 2 node publishes camera images, another detects objects, a third estimates vehicle pose, and a planner consumes those results to send commands to the robot.
Key points
< Nodes and communication >
ROS 2 applications are usually divided into nodes, each responsible for a focused job. Nodes communicate through several patterns:
| Mechanism | Communication style | Example |
|---|---|---|
| Topic | Publish and subscribe stream | A camera node publishes images to perception nodes |
| Service | Request and response | A diagnostic tool asks a node for its current status |
| Action | Long-running goal with feedback and result | A navigation component receives a goal pose and reports progress |
| Parameter | Node configuration value | A localization node receives a map path or sensor threshold |
ROS 2 commonly uses the Data Distribution Service (DDS) standard underneath for discovery and message transport.
< What it is used for >
- Integrating sensor drivers, perception, localization, planning, control, and logging.
- Defining message types, coordinate transforms, launch configurations, and diagnostics.
- Connecting robot software to a simulator or physical hardware.
- Supporting distributed systems in which components run in separate processes or on different machines.
< ROS 2 and simulation >
ROS 2 does not simulate physics or train a neural network by itself. Instead, it can connect a robot application to simulators such as Gazebo or Isaac Sim through bridges, topics, services, and actions. The same high-level robot software can then be tested in simulation before it is connected to hardware.
Comparison
< ROS 2 vs a simulator >
| ROS 2 | Isaac Sim or Gazebo | |
|---|---|---|
| Primary role | Connect and organize robotics software components | Simulate robots, worlds, physics, and sensors |
| Simulates physics? | No | Yes |
| Runs on real hardware? | Yes | Indirectly, through testing and integration workflows |
| Relationship | Can exchange messages with a simulator or robot | Can publish simulated sensor data and receive control commands through ROS 2 |
Related ideas
- Simulation & Development introduces the broader tool category.
- Gazebo is commonly used with ROS 2 to test robotics software in simulation.
- Isaac Sim offers ROS 2 integration for NVIDIA-based simulation workflows.
- Sensor Fusion is one robotics capability that can be implemented as cooperating ROS 2 nodes.