Closed a-sid closed 2 months ago
Self-answering this after some investigation.
The fix for me was to use modern NetworkInterface
setting and to configure multicast settings for the interface inside it:
<CycloneDDS><Domain><Compatibility><ManySocketsMode>none</ManySocketsMode></Compatibility><General><Interfaces><NetworkInterface name="my_interface" multicast="true" prefer_multicast="true"/></Interfaces></General></Domain></CycloneDDS>
While the setting itself is well-documented, it would be good to make an explicit recommendation not to use NetworkInterfaceAddress
since it is still met across the Internet.
Hi!
I've met a configuration (?) issue and don't know how to resolve it correctly. I have a publisher on a remote host (
host_1
) which publishes a topic. On another host (host_2
), two subscriber processes are running (same binary started twice). Surprisingly, only a single subscriber receives messages from a publisher. After it is terminated, another one starts to receive messages. It looks like a multicast configuration issue but I don't know what's going wrong here.I'm using CycloneDDS via ROS2 interfaces. My
CYCLONEDDS_URI
for all running processes is the following:So, multicast is enabled explicitly. Interface settings are correct - otherwise, the communication won't start at all. However,
tcpdump
shows that only a minor amount of packages on the chosen interface are actually multicast. Most packets areand back. Multicast packets
are met rarely in the output, approximately every 8 seconds. These are service discovery packets, I guess.
So, is there something wrong with my configuration that I am missing?
Thanks for any help in advance!