Inferensys

Glossary

ROS 2 DDS (Data Distribution Service)

ROS 2 DDS is the use of the Data Distribution Service (DDS) standard as the underlying middleware layer in ROS 2, providing decentralized discovery, configurable Quality of Service (QoS), and real-time data exchange for robotic systems.
Strategy consultant facilitating AI use case discovery workshop, sticky notes on glass wall, casual corporate meeting.
MIDDLEWARE LAYER

What is ROS 2 DDS (Data Distribution Service)?

ROS 2 DDS refers to the architectural decision in ROS 2 to use the Data Distribution Service (DDS) standard as its default middleware layer, replacing the custom TCPROS/UDPROS layer from ROS 1.

In ROS 2, the Data Distribution Service (DDS) is the standardized, real-time publish-subscribe middleware that handles all decentralized discovery, message serialization, and network transport between nodes. This provides a robust, vendor-neutral communication backbone with configurable Quality of Service (QoS) policies for reliability, durability, and deadlines, enabling deterministic data exchange suitable for safety-critical and production systems.

By abstracting the DDS layer through the ROS Client Library (RCL), ROS 2 gains inherent support for multi-robot systems, enhanced security via DDS Security plugins, and true peer-to-peer architectures. The use of DDS is the core architectural shift from ROS 1, directly enabling ROS 2's goals of improved performance, real-time capability, and deployment in heterogeneous, distributed environments.

CORE MIDDLEWARE ARCHITECTURE

Key Features of ROS 2 DDS

The Data Distribution Service (DDS) is the foundational communication layer for ROS 2, replacing the custom middleware of ROS 1. It provides a standardized, decentralized, and highly configurable real-time data bus.

01

Decentralized Discovery

ROS 2 DDS employs a peer-to-peer discovery protocol where nodes dynamically find each other on the network without a central coordinator (like the ROS 1 Master). This eliminates a single point of failure and enhances system robustness. Discovery happens automatically via multicast or unicast, where nodes exchange participant announcements and endpoint information (topics, services). This architecture is critical for multi-robot systems and distributed computing where central servers are impractical.

02

Configurable Quality of Service (QoS)

This is a defining feature of DDS. QoS policies allow developers to precisely tune the communication semantics between publishers and subscribers to match application requirements. Key policies include:

  • Reliability: Choose between RELIABLE (guaranteed delivery with retries) or BEST_EFFORT (lower overhead, no retries).
  • Durability: Configure VOLATILE (late-joining subscribers miss old data) or TRANSIENT_LOCAL (server stores data for late joiners).
  • History Depth: Control how many messages are kept in a queue (KEEP_LAST or KEEP_ALL).
  • Deadline: Set a maximum expected period between message publications.
  • Liveliness: Define how a node signals it is still "alive." This fine-grained control enables everything from best-effort sensor data to strict real-time control loops within the same framework.
03

Real-Time Data-Centric Publish-Subscribe

DDS implements a global data space model. Publishers and subscribers interact via topics defined by a name and a data type (ROS message). The middleware is responsible for efficient, type-safe data marshalling and routing. This model is inherently many-to-many and asynchronous, ideal for streaming data like sensor feeds. The data-centric design means the system manages data objects and their lifecycle, not just point-to-point messages. Underlying transports like UDP, TCP, and shared memory are abstracted, with DDS selecting the most efficient path, including intra-process communication when possible.

05

Transport and Platform Agnosticism

DDS is an Object Management Group (OMG) standard, not a proprietary protocol. This standardization allows ROS 2 to be vendor-neutral. Multiple DDS implementations (RTI Connext, Eclipse Cyclone DDS, eProsima Fast DDS) can be used as the RMW (ROS Middleware Interface) layer. The RMW provides a common API, allowing ROS 2 core libraries (rclcpp, rclpy) to work with any compliant DDS vendor. This enables:

  • Selection based on performance, cost, or platform support (e.g., real-time OS, Windows, Linux).
  • Interoperability with non-ROS systems that also use DDS, common in aerospace, defense, and industrial automation.
06

Domain Partitioning

DDS introduces the concept of a Domain. In ROS 2, this is controlled by the ROS_DOMAIN_ID environment variable (an integer from 0-232). Nodes with the same Domain ID can discover and communicate with each other; nodes with different IDs are completely isolated. This is a lightweight form of network segmentation used for:

  • Running multiple independent robot systems on the same physical network without interference.
  • Isolating development, testing, and production environments.
  • Preventing accidental cross-talk between robots in a shared space like a laboratory or warehouse.
MIDDLEWARE ARCHITECTURE

How ROS 2 DDS Works

ROS 2 DDS refers to the foundational middleware layer in the Robot Operating System 2, which is built upon the Data Distribution Service (DDS) standard to enable robust, real-time data exchange.

ROS 2 DDS is the decentralized communication backbone of ROS 2, replacing the centralized master node of ROS 1. It leverages the Data Distribution Service (DDS) standard, an Object Management Group (OMG) specification for scalable, real-time publish-subscribe systems. In this architecture, each ROS 2 node embeds a DDS participant that handles peer-to-peer discovery, connection establishment, and data serialization directly with other nodes, eliminating a single point of failure and enabling true distributed system design.

The DDS layer provides configurable Quality of Service (QoS) policies that govern data delivery. Developers can tune policies like reliability (best-effort vs. reliable), durability (transient-local for late joiners), and deadlines to match application needs, from best-effort sensor streams to deterministic control loops. This abstraction allows ROS 2 to support diverse real-time robotic control systems and heterogeneous fleet orchestration across mixed networks, forming the core of its production-grade capabilities for embodied intelligence systems.

MIDDLEWARE COMPARISON

Common DDS Implementations for ROS 2

A feature and performance comparison of the primary DDS (Data Distribution Service) middleware implementations officially supported and commonly used with ROS 2.

Feature / MetriceProsima Fast DDSRTI Connext DDSCyclone DDS

Primary Vendor / Maintainer

eProsima (Open Source)

Real-Time Innovations (Commercial)

Eclipse Foundation (Open Source)

Default RMW in ROS 2

License Model

Apache 2.0

Commercial (Free limited version)

Eclipse Public License 2.0

Discovery Protocol

Simple Participant & PDP

RTPS with Enhanced Discovery

Simple Participant Discovery Protocol (SPDP)

Intra-process Communication

Shared Memory Transport

Real-Time Publish-Subscribe Protocol

Dynamic Type Support

DDS Security Plugin

Typical Latency (Round-trip)

< 1 ms

< 0.5 ms

< 2 ms

Memory Footprint (Minimal)

~15 MB

~20 MB

~10 MB

Platform Support

Linux, Windows, macOS, QNX, VxWorks, Android

Linux, Windows, macOS, QNX, VxWorks, INTEGRITY, z/OS, more

Linux, Windows, macOS, FreeRTOS, Zephyr

Primary Use Case in Robotics

General-purpose, research, default for many distros

Certified, high-reliability, safety-critical systems

Resource-constrained, embedded, and deterministic systems

ROS 2 DDS

Frequently Asked Questions

The Data Distribution Service (DDS) is the foundational middleware layer in ROS 2, replacing the custom broker in ROS 1. This FAQ addresses common questions about its role, configuration, and impact on robotic system design.

The Data Distribution Service (DDS) is a standardized, data-centric middleware protocol (defined by the Object Management Group) that provides decentralized, real-time publish-subscribe communication. ROS 2 uses DDS as its default middleware to gain a production-grade communication layer with several critical advantages over ROS 1's custom system: decentralized discovery (no single-point-of-failure master node), configurable Quality of Service (QoS) policies for reliable or best-effort communication, inherent support for real-time systems, and robust security features via the DDS Security specification. This shift enables ROS 2 to support complex, multi-robot, and safety-critical applications.

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.