FixTheRobot Explore Robotics / Systems Engineering / Troubleshooting

Troubleshooting · Compute and ROS 2

ROS 2 communication fails between computers

Check the domain, the discovery settings and the network path first, then QoS and message size.

  • Related modules: 20
  • ROS 2 Jazzy

1. Symptoms

  • ros2 topic list on one computer does not show the other’s topics.
  • Topics appear and no data flows.
  • Data flows on a wired link and not over Wi-Fi.

2. Possible causes

  • Different ROS_DOMAIN_ID values (valid safe choices are 0 to 101).
  • Discovery range limited (ROS_AUTOMATIC_DISCOVERY_RANGE) or localhost-only settings.
  • Multicast blocked by the network or a firewall.
  • Incompatible QoS between publisher and subscription.
  • Large messages fragmented over a lossy link (see the DDS tuning guide).
  • Different DDS implementations with incompatible settings, or clocks that differ.

3. Measurements to collect

  • ROS_DOMAIN_ID and discovery variables on both computers.
  • Network reachability and multicast.
  • ros2 topic info --verbose for QoS.
  • Packet loss and kernel buffers.

4. Diagnostic commands

Commands are not executed by the site’s automated tests (they need a ROS 2 Jazzy installation or the robot).

echo $ROS_DOMAIN_ID $ROS_AUTOMATIC_DISCOVERY_RANGE
ros2 topic list
ros2 topic info /scan --verbose
ping -c 3 <other-computer>

5. Step-by-step investigation

  1. Compare the domain ID and discovery variables on both computers.
  2. Check the network path and multicast; test with a simple talker and listener.
  3. Check QoS compatibility with topic info --verbose.
  4. Check message sizes and the link (Wi-Fi fragmentation, buffers).
  5. Check the DDS implementation and the clocks.

6. Corrective actions

  • Use the same domain ID and an appropriate discovery range.
  • Allow multicast or configure static peers or a discovery server.
  • Make QoS compatible.
  • Reduce message size or use a wired link; tune buffers as in the DDS tuning guide.

7. Validation after the fix

  • Topics list on both computers and data flows at the expected rate for an hour.

References

  • ROS 2 Jazzy, The ROS_DOMAIN_ID: docs.ros.org, and Configuring your ROS 2 environment: docs.ros.org, read 2026-11-06.
  • ROS 2 Jazzy, DDS tuning: docs.ros.org, read 2026-11-06.
  • ROS 2 Jazzy, About Quality of Service settings: docs.ros.org, read 2026-11-06.