0
$\begingroup$

Rosanswers logo

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.


Originally posted by Luis Ruiz on ROS Answers with karma: 114 on 2016-03-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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?


Originally posted by gvdhoorn with karma: 86574 on 2016-03-25

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Luis Ruiz on 2016-03-25:
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?

Comment by gvdhoorn on 2016-03-25:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.