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

Select between a network or local publisher

asked 2016-03-25 05:58:41 -0500

Luis Ruiz gravatar image

updated 2016-03-25 06:20:19 -0500

I am running 4 robots in a network. I was wondering if it is possible to select/configure if a published topic is available for all the robots in the network or only for itself. Right now when I run the programs all the topics are available for everyone in the network.

A robot is processing an image and at the same time it is sending information through the network, I think it makes no sense to publish the image topics on the network.

In other words if a topic is not needed on the network, does it get published on the network?

This question is related.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-25 06:30:12 -0500

gvdhoorn gravatar image

In other words if a topic is not needed on the network, does it get published on the network?

'needed' is a bit vague, but if no one is subscribing, no data is sent over the network. Period.

This is also answered by @dornhege in the question you linked:

First, if no one is subscribing over the network, then nothing should be happening when you publish, i.e. if network bandwidth is wasted somewhere, there must be some connection between a publisher and subscriber (rviz counts!). This is already somewhat implicitly in the core code as if there are no connections, there is no where to send to.

If you feel this is not an adequate answer, can you please clarify why you still have doubts about that?

edit flag offensive delete link more


If you execute rostopic list on any machine you can see the all the topics, but then that means that it is until rostopic list or rostopic echo or something like a subscriber happens that the topic is sent?

Luis Ruiz gravatar image Luis Ruiz  ( 2016-03-25 06:38:27 -0500 )edit

rostopic list (and related tools) use the XMLRPC Master API, which doesn't transmit any topic data, just pieces of text. Commands like rostopic echo|bw|hz do subscribe to topics, so those will result in topic data being transmitted.

gvdhoorn gravatar image gvdhoorn  ( 2016-03-25 07:00:35 -0500 )edit

Question Tools

1 follower


Asked: 2016-03-25 05:58:41 -0500

Seen: 736 times

Last updated: Mar 25 '16