ROS 2: What is DDS

What is ROS 2?

ROS 2, or Robot Operating System 2, is an open-source framework designed to simplify the development of robot software. It builds upon the concepts introduced in the original ROS but incorporates several key improvements:

  • Real-Time Capabilities: ROS 2 has improved support for multi-threading and asynchronous operations, which is crucial for applications requiring timely and predictable responses.

  • Middleware Abstraction: It uses the Data Distribution Service (DDS) as its underlying communication middleware. This provides more flexibility and reliability in data exchange between components.

  • Modular Architecture: The system is designed to be modular and flexible, allowing developers to use only the parts they need for their specific application.

ROS 2 provides a flexible framework for rapidly developing software for robotics system components. To facilitate interoperability, ROS 2 uses a common set of data types for communications between applications. This has led to the creation of a vast ecosystem of interoperable tools and application modules for ROS 2, which greatly simplifies the task of creating robotics systems.

What is DDS?

DDS, or Data Distribution Service, is an open-standard data communications framework designed to facilitate real-time, scalable, and reliable communication between distributed systems. It is particularly useful in demanding environments where high-performance and predictable data exchange is critical, such as in robotics, autonomous vehicles, industrial automation, and other complex and critical systems.
The key aspects of DDS include:

  • Data-Centric: With DDS, the data itself is the interface between applications. This reduces system complexity and enables efficient routing, filtering and traffic-shaping without burdening the applications that use it.
  • Publish-Subscribe Model, where data producers (publishers) send data to a topic, and data consumers (subscribers) receive data from that topic. This decouples the data producers and consumers, allowing for flexible and scalable communication.
  • Quality of Service (QoS): DDS specifies a rich set of QoS policies to enable operation in the noisy, contested and intermittent transports of the real world.
  • Real-Time Capabilities, for low-latency and high-throughput data exchange.
  • Vast Scalability, with its support of keyed topics and tiered architectures, DDS is designed to scale from small embedded to extremely large systems.
  • Standards-based Interoperability: DDS is an open standard, with more than a dozen independently created implementations that can interoperate with each other. This promotes supplier flexibility and reduces the risk of vendor lock-in.
  • Decentralized Architecture: DDS provides its own mechanisms for applications to discover and directly communicate with each other; no central servers or brokers are needed.
  • Security: DDS takes a granular approach to security, enabling individual topic data flows to be authenticated, encrypted, and access controlled. Developers can freely intermix different levels of security on the same network.

DDS is used in thousands of the world’s most demanding and critical systems, where failure is not an option.

ROS 2 brings together the ROS ecosystem of robotics-oriented tools and packages with the performance and advanced capabilities of DDS.

A Deconstructed View of ROS 2 and DDS

The elements needed to build real-time distributed systems can be grouped into three categories:

Required: The system cannot function nor work together without these elements:

  • A data communications framework (DDS)
    This ensures the right data gets to the right place at the right time. This should be as capable, robust, and field-proven as possible; your entire system depends on it.
  • A common data language for all applications (ROS data types)
    A common set of data types enables all applications to ‘speak the same language’, ensuring interoperability now and in the future.

Optional: These elements can be easily substituted or omitted entirely:

  • Parameter System (ROS)
    A way of remotely setting and reading control signals in your applications, if needed.
  • A Comprehensive Software API (ROS)
    Adds in some functions for working with threads, timers, strings, etc. to avoid using additional libraries.
  • Built-In Command Line Utilities (ROS)
    Enables easy inspection and modification of topic data values, parameters, nodes and packages, built in to every application.

External: These elements are used in development and are typically not part of a deployed system:

  • Tools and Utilities (ROS and DDS)
    For visualization, record/replay, introspection, modification, monitoring, packaging, etc.
  • Application Build System (ROS, DDS, many sources)
    A system to build the applications (ROS colcon), or to integrate with your existing build system.

ROS 2 is a robotics-focused all-in-one-bundle solution, whereas DDS is designed for flexibility to work with multiple industries, frameworks, build systems, platforms and programming languages.