Multi-computer DDS Configurations

Like all ROS 2 applications, MoveIt Pro relies on a DDS based ROS middleware (RMW) for intercommunication between processes.

In MoveIt Pro, we support Cyclone DDS and eprosima Fast RTPS (formally FastDDS) middlewares.

MoveIt Pro will use one or the other depending on the environment variable RMW_IMPLEMENTATION, or default to Cyclone DDS if RMW_IMPLEMENTATION is not set. By default, MoveIt Pro will create a new default configuration for the middleware you have selected, as described later in this document. Another option is to replicate a DDS config file that you have in your localhost. You can choose one behavior or the other by running the MoveIt Pro configuration script, or by manually setting USE_HOST_DDS to true or false in your .env file or environment.

For instance, if USE_HOST_DDS=true, RMW_IMPLEMENTATION=rmw_cyclonedds_cpp and a CYCLONEDDS_URI environment variable is defined and pointing to a valid file (e.g. $HOME/.ros/cyclonedds.xml), MoveIt Pro would copy the localhost’s DDS configuration located at CYCLONEDDS_URI into the Docker container and use Cyclone DDS with this copied configuration. More details below.

Note

In our experience, many failures are caused by misconfiguring DDS settings. When launching MoveIt Pro, or connecting any additional ROS 2 nodes or processes, we strongly recommend that you check your local environments for any dangling DDS configuration.

If connecting external applications to MoveIt Pro, you must be certain that the generated DDS configuration will function with what is running in your other processes.

Cyclone DDS

If RMW_IMPLEMENTATION=rmw_cyclonedds_cpp, MoveIt Pro will be configured to use Cyclone DDS as middleware. If USE_HOST_DDS=false (default), MoveIt Pro will generate a new DDS configuration on the fly from the CYCLONEDDS_NETWORK_INTERFACE, CYCLONEDDS_PEER_ADDRESSES, and CYCLONEDDS_USE_MULTICAST environment variables (more information about these variables can be found below). If USE_HOST_DDS=true, MoveIt Pro will copy the host Cyclone DDS configuration if one exists (defined by the CYCLONEDDS_URI env variable), or error out if it doesn’t exist.

For Cyclone DDS, the application specific variables are:

  • RMW_IMPLEMENTATION - Should be set to rmw_cyclonedds_cpp, as noted in the ROS documentation.
  • CYCLONEDDS_URI - Specifies the location of the host Cyclone DDS configuration file to be copied. Should default to $HOME/.ros/cyclonedds.xml.

If a new configuration file has to be created, it can be configured with these environment variables:

  • CYCLONEDDS_NETWORK_INTERFACE - Specifies the network interface for Cyclone DDS to use. Default set to lo.
  • CYCLONEDDS_USE_MULTICAST - Whether or not to use multicast. Default set to false.
  • CYCLONEDDS_PEER_ADDRESSES - The network addresses of all peers to your application, as a comma-separated list. Default set to 127.0.0.1.

A full, sample Cyclone DDS configuration would look like this:

<?xml version="1.0" ?>
<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 name="lo"/>
      </Interfaces>
      <AllowMulticast>false</AllowMulticast>
    </General>
    <Discovery>
      <ParticipantIndex>auto</ParticipantIndex>
      <Peers>
        <Peer Address="127.0.0.1"/>
      </Peers>
      <MaxAutoParticipantIndex>120</MaxAutoParticipantIndex>
    </Discovery>
  </Domain>
</CycloneDDS>

FastRTPS

MoveIt Pro also supports eprosima Fast RTPS (formally FastDDS) as a DDS implementation.

If RMW_IMPLEMENTATION=rmw_fastrtps_cpp, MoveIt Pro will be configured to use Fast RTPS as middleware. If USE_HOST_DDS=false (default), MoveIt Pro will generate a new standard FastDDS config file. If USE_HOST_DDS=true, MoveIt Pro will copy the host Fast RTPS configuration if one exists (defined by the FASTRTPS_DEFAULT_PROFILES_FILE env variable), or error out if it doesn’t exist.

You can also set RMW_FASTRTPS_USE_QOS_FROM_XML to 1 to allow any QoS settings from your specific XML configuration to actually take effect. For additional information, refer to the ROS 2 package’s README.