Inferensys

Glossary

ROS 2

ROS 2 is the second-generation Robot Operating System, an open-source middleware framework for building secure, real-time, and production-grade robotic applications.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
ROBOT OPERATING SYSTEM

What is ROS 2?

ROS 2 is the second-generation, production-ready middleware framework for building distributed robotic systems, built upon the Data Distribution Service (DDS) standard.

ROS 2 (Robot Operating System 2) is an open-source middleware framework that provides libraries, tools, and communication protocols for developing complex, distributed robotic software systems. It is the successor to ROS 1, featuring a redesigned architecture built on the Data Distribution Service (DDS) standard. This foundation enables real-time performance, multi-robot support, and production-grade features like configurable Quality of Service (QoS) policies and built-in security.

The framework abstracts hardware and operating system details, allowing developers to focus on application logic using a publish-subscribe model over topics, synchronous services, and long-running actions. Core architectural components include the ROS Client Library (RCL), executors for callback processing, and lifecycle nodes for managed states. ROS 2 is designed for real-world deployment in autonomous vehicles, industrial robots, and research platforms, supporting everything from microcontrollers via Micro-ROS to large-scale heterogeneous fleets.

ROS 2

Key Architectural Components

ROS 2's architecture is a complete redesign from its predecessor, built on a foundation of industry standards to provide real-time performance, multi-robot support, and production-grade reliability. Its core components define how robotic software is structured, communicated, and managed.

03

Executor & Callback Processing

The Executor is the processing engine within a node that schedules the execution of callbacks from timers, subscriptions, services, and action servers. It manages the flow of data from the DDS layer to user code. ROS 2 provides several executor types:

  • SingleThreadedExecutor: Processes all callbacks sequentially in one thread.
  • MultiThreadedExecutor: Uses a thread pool to process callbacks concurrently, improving responsiveness.
  • StaticSingleThreadedExecutor: An optimized variant for known, fixed callback groups. Proper executor configuration is critical for meeting real-time deadlines and avoiding callback starvation.
05

Quality of Service (QoS) Policies

ROS 2 Quality of Service (QoS) policies are a foundational architectural feature, allowing fine-grained control over communication reliability and resource usage. Policies are set per publisher/subscriber or client/server pair. Key policies include:

  • Reliability: RELIABLE (guaranteed delivery) vs. BEST_EFFORT.
  • Durability: TRANSIENT_LOCAL (late-joining subscribers get last message) vs. VOLATILE.
  • Deadline: The maximum expected time between messages.
  • Liveliness: How a node signals it is still alive. This allows tuning from loss-tolerant sensor data to critical real-time control commands.
ARCHITECTURAL COMPARISON

ROS 1 vs. ROS 2: Core Differences

A technical comparison of the core architectural and communication features between the first and second generations of the Robot Operating System.

Feature / ComponentROS 1 (Noetic)ROS 2 (Humble, Iron)

Underlying Middleware

Custom TCPROS/UDPROS

DDS Standard (RTPS)

Discovery Mechanism

Centralized Master Node

Decentralized Peer-to-Peer

Real-Time Support

Limited / Non-deterministic

Native via DDS QoS Policies

Cross-Platform Support

Primarily Linux

Linux, Windows, macOS, RTOS

Network Communication

Single Machine / Basic LAN

Robust WAN & Multi-Robot

Security Framework

None (Plaintext)

SROS 2 (Auth, Encryption, Access Control)

Node Lifecycle Management

Ad-hoc start/stop

Managed Lifecycle Nodes (State Machine)

Build System

catkin

colcon

Primary Client Libraries

roscpp, rospy

rclcpp, rclpy

Default Communication Model

Publish-Subscribe (Topics)

Publish-Subscribe with configurable QoS

Parameter Server

Centralized, XML-RPC based

Distributed, node-local with events

Launch System

XML-based (roslaunch)

Python-based (ros2 launch)

Multi-Robot Support

Complex, requires bridging

Native via Domain ID isolation

Default Serialization Format

Custom

CDR (Common Data Representation)

ROS 2

Primary Use Cases & Applications

ROS 2's redesigned architecture, built on the Data Distribution Service (DDS), enables its deployment in production-grade systems where reliability, real-time performance, and security are non-negotiable.

04

Research & Prototyping Platforms

ROS 2 remains a cornerstone in academic and industrial research for developing next-generation embodied intelligence.

  • Simulation Integration: Seamlessly interfaces with high-fidelity physics-based simulators like Gazebo and Ignition for Sim-to-Real Transfer Learning.
  • Algorithm Development: Provides a standardized framework for implementing and testing Reinforcement Learning for Robotics, Imitation Learning, and advanced Model Predictive Control (MPC) algorithms.
  • Modularity: The component-based architecture allows researchers to rapidly swap out perception, planning, or control modules for experimental comparison.
05

Healthcare & Assistive Robotics

ROS 2 enables the development of sophisticated surgical and rehabilitation robots where precision and safety are paramount.

  • Real-time Control Loops: Guarantees low-latency execution for haptic feedback and sub-millimeter precision in surgical manipulators.
  • Human-Robot Interaction (HRI): Supports safe collaboration through force/torque sensing and compliant control modes.
  • Regulatory Compliance: The auditability of the ROS 2 communication graph and configurable security features assist in meeting stringent medical device regulations.
ROS 2

Frequently Asked Questions

Essential questions and answers about ROS 2, the second-generation Robot Operating System designed for production-grade, real-time, and secure robotic applications.

ROS 2 is the second-generation, open-source middleware framework for building distributed robotic software systems, built on the Data Distribution Service (DDS) standard for real-time, reliable, and secure communication. It operates as a decentralized network of executable processes called nodes that communicate asynchronously via topics (publish-subscribe), synchronously via services (request-response), or for long-running tasks via actions. The DDS middleware layer handles peer-to-peer discovery, message serialization, and configurable Quality of Service (QoS) policies, allowing developers to tune communication for everything from best-effort data streams to deterministic, real-time control loops. This architecture enables the creation of complex, modular applications that can run across heterogeneous hardware, from powerful workstations to microcontrollers via Micro-ROS.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.