DDS configuration — practical setup for robots spanning multiple computers
Atlasbot · 17/8/2026 · 11 min read
The article DDS is what? has interpreted RMW as the class of abstraction allowing to change the underlying DDS implementation. This unit goes into the environment variables and configuration files used in real-world implementations of multi-machine robots — in the correct situation where a control PC and an embedded computer on the robot (such as the Jetson Orin Nano architecture + PC in Atlas A2 project) must see each other over the network.
Key concepts
echo $RMW_IMPLEMENTATION
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # change from Fast DDS (default) to Cyclone DDS
Slope Practise does not need to rebuild the code — as the application code calls only via rclpy/rclcpp, never directly calling the DDS specific API. Common reasons for changes in the real-world: Cyclone DDS is generally more stable on an unreliable WiFi network (mobile robotics), while Fast DDS is the default and has a larger community when looking up bugs.
How it works
Isolate multiple networked robots using ROS_DOMAIN_ID:
export ROS_DOMAIN_ID=42
Each domain ID is an independent DDS — node in domain 42 that does not see a node in domain 0, despite running on the same physical WiFi network. Mandatory that every machine participating in the same robotic system set the same ID domain — to forget to synchronize this value is the most common cause of "emptytopic list errors even though the node is apparently running on the other machine" error.
export ROS_LOCALHOST_ONLY=1
This variable limits discovery to only localhost— which is useful when running multiple independent ROS2 instances on the same machine without wanting them to accidentally see each other.
Finally:
RMW_IMPLEMENTATIONselects * the type* DDS running below,ROS_DOMAIN_IDselects * the isolation channel* between the node groups — two independent variables, both of which must match between machines participating in the same system in order to communicate.
QoS Profile XML — when the default API is not sufficient, use the separate XML file of each DDS implementation to explicitly declare discovery:
<!-- cyclonedds_config.xml -->
<CycloneDDS>
<Domain>
<General>
<NetworkInterfaceAddress>192.168.1.50</NetworkInterfaceAddress>
</General>
<Discovery>
<Peers>
<Peer Address="192.168.1.10"/> <!-- Control PC -->
<Peer Address="192.168.1.50"/> <!-- Jetson on robot -->
</Discovery>
</Domain>
</CycloneDDS>
</CycloneDDS>
export CYCLONEDDS_URI=file:///path/to/cyclonedds_config.xml
Technical details
Parameters
The most commonly used DDS/ROS2 environment variables, lumped together into a quick lookup table:
| Environment Variable | Effects |
|---|---|
RMW_IMPLEMENTATION | Select DDS implementations (rmw_fastrtps_cpp, rmw_cyclonedds_cpp...) |
ROS_DOMAIN_ID | Isolate node group (0 - 101), must match all hosts in the same system |
ROS_LOCALHOST_ONLY | Limits discovery to current host, not to external network |
CYCLONEDDS_URI | Detailed XML configuration file path for Cyclone DDS |
FASTRTPS_DEFAULT_PROFILES_FILE | Equivalent to CYCLONEDDS_URI but for Fast DDS |
Practical applications
The standard DDS implementation process for a multi-host robot system (e.g., PC + Jetson on robot) consists of 3 steps: (1) set the same ROS_DOMAIN_ID in the boot environment file of both machines (.bashrc or systemd service environment file, not just hand - typed in 1 terminal); (2) firewall check to allow the correct UDP port range calculated according to the 7400 + 250×domain_id formula learned in the DDS lesson; (3) if the network blocks multicast (common in corporate/home networks), switch to the Peers unicast profile as the XML example above — skipping step 3 is the most common reason why the two machines "set the right ID domain and still do not see each other" on corporate networks.
Practical example
$ ros2 multicast receive
# Terminal 1 (on the control PC)
Waiting for datagrams...
$ ros2 multicast send
# Terminal 2 (on the robot's Jetson)
Sending 1 bytes...
If Terminal 1 receives the packet: multicast works between the 2 machines
If nothing arrives after a few seconds: the network is blocking multicast — switch
to an explicit unicast Peers configuration, as in the XML example above
ros2 multicast send/receive is the most accurate diagnostic tool to confirm whether the problem lies at the network level (multicast blocked) or at the ROS2 configuration level (ROS_DOMAIN_ID wrong) — explicitly separates these 2 possibilities before further debugging.
Common mistakes
- Synchronization of
ROS_DOMAIN_IDbetween — as stated in the Operating Principles section is the most common cause of the error "not seeing node/topic of other machine". - Set environment variable in terminal but not applicable to systemd service — the boot-automated service does not inherit environment variable already
exportin a manual terminal session — to be declared in fileEnvironment=of service definition or private environment file read by the service. - Unicast configurations Peers forgetting to open the correct port firewall — the declaration of
<Peers>in XML is not sufficient if the system firewall still blocks the UDP port strip calculated by the domain ID formula — which tests both classes (DDS configuration and OS firewall). - DDS implementation merges differently between hosts without compatibility checks— as stated in the DDS article, while following the same RTPS standard, some individual extensions by individual carriers sometimes cause sophisticated problems — so synchronizing 1 DDS implementation to the whole system if possible.
Conclusion
DDS real-world configuration revolves around 2 layers: choosing the right implementation (RMW_IMPLEMENTATION) and isolating the right channel (ROS_DOMAIN_ID), with XML profile as a backup tool when crossing the limits of multicast on corporate networks. ros2 multicast send/receive is the fastest diagnostic tool to separate the network problem from the ROS2 configuration problem. This is also the last article of the entire ROS / ROS2 — category from basic concepts (node, topic, service, action), communication mechanisms (message, QoS, DDS, TF2), package packaging, CLI toolkit, to advanced techniques (lifecycle, composition, callback group, threading, executor, DDS), which, as learned, have enough comprehensive background to build and operate a complete ROS2 robotic software system in the real-world.
Get new articles and lessons by email
When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.
Unsubscribe any time with the link in each email. See our Privacy policy.