Skip to main content
Version: 8

Configure ROS 2 DDS

Like most ROS 2 applications, MoveIt Pro relies on a DDS based ROS middleware (RMW) for intercommunication between processes. In MoveIt Pro, we support Eclipse Cyclone DDS and eprosima Fast DDS (formerly Fast RTPS) middlewares.

We provide users 3 options:

  1. (default) Let MoveIt Pro configure a "single computer" Cyclone DDS configuration
  2. Let MoveIt Pro configure a "dual computer" Cyclone DDS configuration
  3. Bring your own custom configuration
More than 2 computers

MoveIt Pro can configure a Cyclone DDS configuration for more than 2 computers. Please contact support and we will provide further recommendations on DDS and launch settings.

1. (default) Let MoveIt Pro configure a "single computer" Cyclone DDS configuration

Our recommended and default Cyclone DDS configuration will perform as follows:

  • Will communicate with ROS 2 processes inside the MoveIt Pro docker container.
  • Will communicate with ROS 2 processes on the host computer.
  • Will NOT communicate with other computers on your network.
  1. Ensure ROS_DOMAIN_ID is not set on the host computer via echo $ROS_DOMAIN_ID
  2. Ensure RMW_IMPLEMENTATION is not set on the host computer or is set to rmw_cyclonedds_cpp via echo $RMW_IMPLEMENTATION.
  3. Answer y to Should MoveIt Pro manage your DDS configuration?.

This Cyclone DDS configuration looks like:

<?xml version='1.0' encoding='us-ascii'?>
<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 autodetermine="false" name="lo" />
</Interfaces>
<AllowMulticast>false</AllowMulticast>
</General>
<Discovery>
<ParticipantIndex>auto</ParticipantIndex>
<Peers>
<Peer Address="127.0.0.1" /></Peers>
<MaxAutoParticipantIndex>50</MaxAutoParticipantIndex>
</Discovery>
<Internal>
<!-- Improves the performance of topic subscribers receiving large messages. -->
<SocketReceiveBufferSize min="10MB" />
</Internal>
</Domain>
</CycloneDDS>

2. Let MoveIt Pro configure a "dual computer" Cyclone DDS configuration

Motivation for multi-computer setups

Some common reasons to consider use of a dual or multi-computer setup include:

  • Difficulty enabling ML hardware acceleration and meeting specific real-time requirements of hardware.
  • Needing to send and receive data from a PLC.

Be sure to review our guides for Setting up GPUs on Real-time Linux and Configuring NVIDIA Jetson when deciding if single or multi-computer is right for you.

  1. Install MoveIt Pro on both computers. For each do the following steps:
  2. Ensure ROS_DOMAIN_ID is not set on each host computer via echo $ROS_DOMAIN_ID.
  3. Ensure RMW_IMPLEMENTATION is not set or is set to rmw_cyclonedds_cpp on each host computer via echo $RMW_IMPLEMENTATION.
  4. Answer y to Should MoveIt Pro manage your DDS configuration?.
  5. Create an environment variable called CYCLONEDDS_NETWORK_INTERFACE on each host computer and set it to the name of the network device on that computer being used to talk to the other computer(s), e.g. enp0s31f6. This will likely be different for each computer you configure. You can find the current names of the network interfaces on each system by running ip a from the command line. The output from this command will be different for the Agent Computer and the Driver Computer.
  6. Create an environment variable called CYCLONEDDS_PEER_ADDRESSES on each host computer and set it to a comma-delimited list of IP addresses of the computers that should talk to each other, including the computer you are setting up, e.g. 192.168.10.10,192.168.10.12. You will use this same list of IP addresses on each computer you configure.
  7. When launching MoveIt Pro, use moveit_pro run --no-drivers and moveit_pro run --only-drivers accordingly.

Example for "dual computer"

Below is an example for setting up a 2 computer configuration. Computer 1 is a low cost computer that will run all our hardware drivers. Computer 2 is a powerful computer that will run our ML inference.

Computer 1 has two network interfaces (one to connect to the internet and another to connect to the Driver Computer), so the network interface information would look similar to this:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 1c:69:7a:0f:3e:75 brd ff:ff:ff:ff:ff:ff
altname enp0s31f6
inet #.#.#.#/24 brd #.#.#.255 scope global dynamic noprefixroute eno1
valid_lft 68323sec preferred_lft 68323sec
inet6 #::#:#:#:#/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f4:3a:8c:70:c2:b1 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.10/24 brd 192.168.10.255 scope global noprefixroute enp0s31f6
valid_lft forever preferred_lft forever
inet6 fe80::c8e:a7ff:f36f:1ef4/64 scope link noprefixroute
valid_lft forever preferred_lft forever

Computer 2 uses two wired network interfaces (one to connect to the Computer 1 and another to connect to the robot's Control Box), so its network interface information would look like this:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp112s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f4:3a:8c:70:c2:b1 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.12/24 brd 192.168.10.255 scope global noprefixroute enp112s0
valid_lft forever preferred_lft forever
inet6 fe80::6a48:1686:19d8:3085/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether f4:3a:8c:70:c2:b1 brd ff:ff:ff:ff:ff:ff
altname enp0s31f6
inet 192.10.0.12/24 brd 192.10.0.255 scope global noprefixroute eno1
valid_lft forever preferred_lft forever
inet6 fe80::a6ae:11ff:fe1e:cb89/64 scope link noprefixroute
valid_lft forever preferred_lft forever

Using the example output above, we would export the following environment variables to Computer 1's environment:

CYCLONEDDS_NETWORK_INTERFACE=enp0s31f6
CYCLONEDDS_PEER_ADDRESSES=192.168.10.10,192.168.10.12

And export the following environment variables to Computer 2's environment:

CYCLONEDDS_NETWORK_INTERFACE=enp112s0
CYCLONEDDS_PEER_ADDRESSES=192.168.10.10,192.168.10.12

3. Bring your own custom configuration

You should have very specific requirements, such as use of micro-ROS or needing greater control of what processes run on what computer, to use this option. Please contact support with your use case so we can consider how to improve our MoveIt Pro configured options.

  1. Answer n to Should MoveIt Pro manage your DDS configuration?.
  2. Ensure your environment variables are set appropriately on the host computer(s) for your chosen DDS implementation.