Skip to main content

📝 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:

MechanismCommunication styleExample
TopicPublish and subscribe streamA camera node publishes images to perception nodes
ServiceRequest and responseA diagnostic tool asks a node for its current status
ActionLong-running goal with feedback and resultA navigation component receives a goal pose and reports progress
ParameterNode configuration valueA 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 2Isaac Sim or Gazebo
Primary roleConnect and organize robotics software componentsSimulate robots, worlds, physics, and sensors
Simulates physics?NoYes
Runs on real hardware?YesIndirectly, through testing and integration workflows
RelationshipCan exchange messages with a simulator or robotCan publish simulated sensor data and receive control commands through ROS 2
  • 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.

Reference​