fkie / multimaster_fkie

ROS stack with FKIE packages for multi-robot (discovering, synchronizing and management GUI)
BSD 3-Clause "New" or "Revised" License
271 stars 108 forks source link

Not ignoring topics #158

Closed caiofis closed 3 years ago

caiofis commented 3 years ago

First of all thank you for the amazing repo, the documentation provided by the technical report is really amazing. I am testing the multimaster architecture to deploy in a system with very limited bandwidth. I am not sure if it is the expected behavior but once I add a topic to the ignore_topics param it don't show up when I run rostopic list, but if I try to echo this topic it seems to be synced. I expected to see this behavior only if the flag sync_topics_on_demand is set to true. Am I missing something?

atiderko commented 3 years ago

Thanks for the praise! Did you run only one master_sync? If not, did you added this topic to all master_sync nodes? Otherwise I need the output from the master_sync node.

caiofis commented 3 years ago

You got it! I was running a master_sync in each computer as stated in the technical report. Running only one I got the expected behavior. But is it possible to setup the system to sync some topics with one computer but not with another one? In my application I have a control station that communicate with several robots. What I was intending to do is to sync all the robots with the control station but not with each other.

atiderko commented 3 years ago

Due to the structure of the ROS communication, the system structure you have described is not completely possible. Topics mit gleichem Name, die auf allen Roboter verwendet werden, werden auch durch einen ROS-Core miteinander verbunden, e.g. /tf. If the robots do not have any common topics, e.g. because they are separated by namespaces, there are various options:

  1. Prevent the robots to detect each other. Start master_discovery on robots with _listen_mcast:=False rosrun fkie_master_discovery master_discovery _listen_mcast:=False
  2. Configure master_sync on robots to ignore other robot hosts using ignore_hosts parameter
  3. Configure master_sync on robots to sync only to control station using sync_hosts parameter

I hope these solutions are suitable to you

caiofis commented 3 years ago

I think that this third option will solve my problem. Thank you!