Skip to content
On this page

Data Distribution Service (DDS) Middlewares

Supported DDS implimentations

Product nameLicenseRMW implementationStatus
eProsima Fast DDSApache 2rmw_fastrtps_cppFull support
Eclipse Cyclone DDSEclipse Public License v2.0rmw_cyclonedds_cppFull support
RTI Connextcommercial, researchrmw_connext_cpp-
Zetascale Zenohcommercial, researchrmw_zenoh-

1. Fast DDS (formerly Fast RTPS)

The default DDS implementation for most ROS2 distributions.

Example Configuration for Fast DDS on Olive Device

This configuration is maintained automatically in the system, and you don't need to change it. However, it's useful to be familiar with it. If desired, you can extend this configuration to your host computer as well. This becomes handy when you wish to modify the buffer size or blacklist certain network interfaces that you don't want to use in ROS2.

The configuraiton is located in

/opt/olive/config/current/fastdds.xml
/opt/olive/config/current/fastdds.xml
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">

    <transport_descriptors>
        <transport_descriptor>
            <transport_id>udp_config</transport_id>
            <type>UDPv4</type>
            <interfaceWhiteList>
                <address>192.168.7.1</address>
            </interfaceWhiteList>
            <sendBufferSize>4259840</sendBufferSize>
            <receiveBufferSize>4259840</receiveBufferSize>
        </transport_descriptor>
    </transport_descriptors>

    <participant profile_name="participant_xml_profile_qos_socketbuffers" is_default_profile="true">
        <rtps>
            <userTransports>
                <transport_id>udp_config</transport_id>
            </userTransports>
            <!-- Buffer sizes, has big effect on performance.
                 * Values
                   * Maximum set on boot: 2147483647 ~ 20MB,
                   * 4259840 ~ 4MB.
                   * 2129920 ~ 2MB - performance similar to 4MB
                   * 1048576 ~ 1MB - worse performance
                 * For some reason, setting the largest value decreases performance.
                 * Make sure to match the transport_descriptor values
             -->
            <!-- See comments in jetson.xml -->
            <sendSocketBufferSize>4259840</sendSocketBufferSize>
            <listenSocketBufferSize>4259840</listenSocketBufferSize><!-- Maximum set on boot: 2147483647, moderate is 2129920 -->
            <useBuiltinTransports>false</useBuiltinTransports>
        </rtps>
    </participant>

</profiles>
</dds>
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">

    <transport_descriptors>
        <transport_descriptor>
            <transport_id>udp_config</transport_id>
            <type>UDPv4</type>
            <interfaceWhiteList>
                <address>192.168.7.1</address>
            </interfaceWhiteList>
            <sendBufferSize>4259840</sendBufferSize>
            <receiveBufferSize>4259840</receiveBufferSize>
        </transport_descriptor>
    </transport_descriptors>

    <participant profile_name="participant_xml_profile_qos_socketbuffers" is_default_profile="true">
        <rtps>
            <userTransports>
                <transport_id>udp_config</transport_id>
            </userTransports>
            <!-- Buffer sizes, has big effect on performance.
                 * Values
                   * Maximum set on boot: 2147483647 ~ 20MB,
                   * 4259840 ~ 4MB.
                   * 2129920 ~ 2MB - performance similar to 4MB
                   * 1048576 ~ 1MB - worse performance
                 * For some reason, setting the largest value decreases performance.
                 * Make sure to match the transport_descriptor values
             -->
            <!-- See comments in jetson.xml -->
            <sendSocketBufferSize>4259840</sendSocketBufferSize>
            <listenSocketBufferSize>4259840</listenSocketBufferSize><!-- Maximum set on boot: 2147483647, moderate is 2129920 -->
            <useBuiltinTransports>false</useBuiltinTransports>
        </rtps>
    </participant>

</profiles>
</dds>

2. Cyclone DDS

A lightweight, high-performance DDS implementation by Eclipse Foundation.

These are the most common DDS implementations used in ROS2. To switch between them, follow the instructions from the previous answer to set the RMW_IMPLEMENTATION environment variable to the desired RMW package.

The following ROS2 DDS implementations are available and open-source for ROS2 which you can change it acording to your need:

How to change DDS middleware on the Olive device?

The default DDS implementation on Olive components are Fast DDS. However Cyclone DDS is also supported. You can change the middleware implementation using the GUI:

dds1!

dds2!

How to change ROS2 DDS implementation to Cyclone DDS for the host computer?

Follow these steps to change the ROS2 DDS implementation to Cyclone DDS:

1. Install Cyclone DDS

First, make sure that Cyclone DDS is installed on your system. You can install it using the following commands for different platforms:

  • Ubuntu:
sudo apt update
sudo apt install ros-humble-rmw-cyclonedds-cpp
sudo apt update
sudo apt install ros-humble-rmw-cyclonedds-cpp
  • macOS, Windows, or building from source:

Please refer to the official Cyclone DDS installation instructions at https://github.com/eclipse-cyclonedds/cyclonedds/blob/master/INSTALL.md

2. Set Cyclone DDS as the default DDS implementation

You can change the default DDS implementation by setting the RMW_IMPLEMENTATION environment variable. You can do this either temporarily or permanently.

  • Temporarily (for the current terminal session):

  • Bash (Linux and macOS):

    export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
    export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
  • PowerShell (Windows):

    $env:RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"
    $env:RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"

After setting the variable, you can run your ROS2 nodes in the same terminal, and they will use Cyclone DDS.

  • Permanently:

To make the change permanent, add the corresponding export or $env command to your shell configuration file. For Bash, this is typically .bashrc or .bash_profile (Linux) or .bash_profile (macOS). For PowerShell, this is typically the $PROFILE script.

How to Verify the change?

To ensure that your ROS2 nodes are using Cyclone DDS, you can run the following command:

ros2 doctor --report
ros2 doctor --report

Look for the "middleware" section in the report. It should show "rmw_cyclonedds_cpp" as the active middleware.

That's it! Now your ROS2 system is using Cyclone DDS as the default DDS implementation.

Example Configuration for Cyclone DDS on the host computer

INFO

On your host computer you need to tell Cyclone which network interface you want to use in your system. This is especially important when you have multiple network interfaces. In this example host IP is 10.42.0.1. (or 192.168.7.100 for newer versinos)

Then you need to add a variable in your .bashrc to define the location of your cyclone dds config. You need to tell where your cyclonedds.xml is located.

export CYCLONEDDS_URI="/home/[username]/cyclonedds.xml"
export CYCLONEDDS_URI="/home/[username]/cyclonedds.xml"

then you need to stop and start the ros2 daemon.

ros2 daemon stop
ros2 daemon start
ros2 daemon stop
ros2 daemon start

Put this configuration in your host computers cyclonedds.xml.

<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
    <Domain Id="any">
        <General>
            <Interfaces>
                <NetworkInterface address="10.42.0.1" priority="default" multicast="default" />
            </Interfaces>
            <AllowMulticast>default</AllowMulticast>
            <MaxMessageSize>65500B</MaxMessageSize>
        </General>
        <Tracing>
            <Verbosity>finest</Verbosity>
            <OutputFile>cyclonedds.log</OutputFile>
        </Tracing>
    </Domain>
</CycloneDDS>
<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
    <Domain Id="any">
        <General>
            <Interfaces>
                <NetworkInterface address="10.42.0.1" priority="default" multicast="default" />
            </Interfaces>
            <AllowMulticast>default</AllowMulticast>
            <MaxMessageSize>65500B</MaxMessageSize>
        </General>
        <Tracing>
            <Verbosity>finest</Verbosity>
            <OutputFile>cyclonedds.log</OutputFile>
        </Tracing>
    </Domain>
</CycloneDDS>