ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Communication master-slave (only few topics)

asked 2021-02-07 10:27:01 -0600

BenedettaT gravatar image

I'm quite new to Ros. I'am using Melodic distribution on three device: one industrial pc (master) and two Jetson Agx (slaves). I set the communication between them and with this configuration the master can see all the topic of the slaves. Instead I would like that the slaves comunicate only few topic to the master, and not all. Is there a way to do this ? I hope that someone could help me. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-02-07 20:00:27 -0600

tryan gravatar image

ROS is peer-to-peer. Any node can always "see" all the topics available as they all must register with the ROS master, but not all data are actually sent to every node. The data messages in a given topic are only sent to subscribers, so if you don't want the PC to receive certain information on certain topics, simply don't place nodes on the PC that subscribe to those topics. If I've missed the intent of your question, please let me know.

edit flag offensive delete link more

Comments

1

Thank you for your replay. My doubt was about the fact that every slave publishes about 30 topics, some of which contain pointclouds or image. So with the command “rostopic list” in the Pc master, I can see about 60 topics, 30 from the first slave, and 30 from the second. Master's nodes subscribe only to 3 topic from every slave, and the other topics are not used. So I was wondering how to send to the master only the topics that could be useful for it. My fear was about that too many topics seen from the master, could create some delays in the master-slave communication, but from your replay I think that this should not happened, because only the 6 topics (which the nodes in master are subscribed to) are actually sent to it from slaves. Is it right? Thank you

BenedettaT gravatar image BenedettaT  ( 2021-02-08 00:58:38 -0600 )edit

That's correct; it sounds like your setup will operate the way you want!

tryan gravatar image tryan  ( 2021-02-08 08:26:06 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-02-07 10:27:01 -0600

Seen: 722 times

Last updated: Feb 07 '21