My colleagues and I had the issue that sometime ros2 topics were not shown in “ros2 topic list” or that we could not “ros2 topic echo” the data. After further investigation, we concluded that the problem occurred when we connected/disconnected new devices to the network ports after the ROS2 nodes were already running. We are able to reproduce 2 cases:
Setup:
- Ubuntu 22.04
- ROS2 humble
- Direct connection to network port, no switch in between.
The problem is shown with any DDS vendor. The only thing that solves these problems is a restart of the ros2 daemon and a restart of the ROS2 nodes. (ros2 daemon restart alone is not sufficient)
My first conclusion in case 1 is that the DDS is not performing a new discovery into the new active network interface. For case 2, I am still unsure what the problem is, but it seems that the DDS creates a dependency on the network interface connected at start.
Is anyone able to reproduce this issues?