ika-rwth-aachen / mqtt_client

ROS / ROS 2 C++ Node for bi-directionally bridging messages between ROS and MQTT
MIT License
188 stars 42 forks source link

mqtt_client seems to not find ROS2 topics anymore if I use a sever based fastdds discovery mechanism #67

Open lars-nagel opened 4 months ago

lars-nagel commented 4 months ago

Let's assume I have two machines that I am running mqtt_client on, both have ROS2 Humble installed. I now run a mosquitto broker on machine 2 and bridge some ros topics from machine 1 to machine 2 via mqtt_client and echo the respective ROS topics on machine 2. That works as expected and I see the data flowing on machine 2.

Now, I add a third machine (running ROS2 Foxy) as a fastdds discovery server and tell machine 1 that machine 3 runs the fastdds discovery server via a client (not super_client) configuration file. I then do not see (ros2 topic list) the ROS topics on machine 1 anymore (as one would expect from a simple client configuration) but, of course, all ROS nodes running on machine 1 can still access the necessary data and are running fine. However, when I now run the mqtt_client on machine 1, the data is not arriving on machine 2 anymore.

It seems that the mqtt_client has somehow problems with the fastdds discovery client/server configuration. Do you have any idea why this could be the case?

lars-nagel commented 4 months ago

Interestingly, I have just tested it, the mqtt_client bridging works again when I configure machine 1 to be a "super_client" instead of being a "client" in the fastdds discovery configuration.

lreiher commented 4 months ago

Sounds complex ;) to be honest, we do not have any experience with mqtt_client in a DDS discovery server setup. For anyone interested in this issue, it might also help to describe how to reproduce your exact setup and reproduce the issue, e.g., using Docker containers.