I'm leaving this issue here because I'm not sure if I'm using master_discovery and master_sync correctly.
Setup
All my robots and computers are running ROS Melodic. I have 5 computers:
A (computers running roscore, master_discovery, and master_sync)
B1 and B2 (computers running roscore, master_discovery, and master_sync)
C1 and C2 (computers running no ROS masters)
For computer connections:
A, B1 and B2 are connected in a common, WiFi network.
B1 and C1 are connected in a local ethernet network (B1 is running the ROS master and the FKIE nodes)
B2 and C2 are connected in a local ethernet network (B2 is running the ROS master and the FKIE nodes)
Each master_sync node is set up to sync to hosts A, B1, and B2 using sync_hosts.
Additionally, I've set up network routing such that B1 and B2 are used as gateways to C1 and C2 respectively. I can directly SSH into C1 and C2 from A, and vice-versa)
All hosts are listed correctly in /etc/hosts. All master_discovery nodes are pointed to the same multicast address (226.0.0.0) and are listening to and sending multicast messages.
Important: sync_remote_nodes and sync_topics_on_demand are set to True on A, B1, and B2's master_sync.
Behaviour
I have some unexpected behaviours, and I'm not sure if I'm setting up the multimaster correctly.
When A publishes messages, B1 and B2 can see the published message. C1 and C2 cannot, but they can see the topic is advertised.
When B1 publishes messages, A and B2 can see the published message. C1 can see it advertised and receive it (since it is connected to B1's ROS network), while C2 cannot receive the message, but can see the topic is advertised.
The same thing happens for B1, but with C1 not being able to receive messages instead.
The most confusing one
When C1 publishes messages, A and B1 can hear the messages and see the advertised topic, B2 and C2 cannot hear the messages but can see the advertised topic (!?!?!??)
Why can A hear the message and B2 can't? Aren't the masters meant to be synced together??
Finally, if B1 or B2 use topic_tools' relay node to relay topics, their respective C computers can hear the relayed topics.
E.g. A publishes a message, B1 uses a relay to republish it on its own ROS network under the same topic name, C1 can now receive the message.
I'm not sure if this last method is the correct solution, since it'll accrue extra network load (right?)
Questions
What is the "correct" way to get C1 and C2 to hear messages from other ROS networks?
Do the non-ROS master computers (C1, C2) need to run master_discovery and/or master_sync?
Do I need to sync the hosts of the non-ROS master computers? (C1, C2) (I tried doing it, it didn't resolve the issue.)
Or if I don't sync the hosts, is syncing the topics another correct way to resolve the issue? (I also tried this, it still didn't work.)
What else could be causing C1 and C2 to not receive messages but still see the topics?
I'm leaving this issue here because I'm not sure if I'm using
master_discovery
andmaster_sync
correctly.Setup
All my robots and computers are running ROS Melodic. I have 5 computers:
roscore
,master_discovery
, andmaster_sync
)roscore
,master_discovery
, andmaster_sync
)For computer connections:
Each
master_sync
node is set up to sync to hosts A, B1, and B2 usingsync_hosts
.Additionally, I've set up network routing such that B1 and B2 are used as gateways to C1 and C2 respectively. I can directly SSH into C1 and C2 from A, and vice-versa)
All hosts are listed correctly in
/etc/hosts
. Allmaster_discovery
nodes are pointed to the same multicast address (226.0.0.0
) and are listening to and sending multicast messages.Important:
sync_remote_nodes
andsync_topics_on_demand
are set to True on A, B1, and B2'smaster_sync
.Behaviour
I have some unexpected behaviours, and I'm not sure if I'm setting up the multimaster correctly.
The most confusing one
Finally, if B1 or B2 use
topic_tools'
relay node to relay topics, their respective C computers can hear the relayed topics.I'm not sure if this last method is the correct solution, since it'll accrue extra network load (right?)
Questions
What is the "correct" way to get C1 and C2 to hear messages from other ROS networks?
master_discovery
and/ormaster_sync
?Cheers!