Ask Your Question
0

Select between a network or local publisher

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

Luis Ruiz gravatar image

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

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
2

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

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

Comments

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 imageLuis Ruiz ( 2016-03-25 06:38:27 -0600 )edit
1

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 imagegvdhoorn ( 2016-03-25 07:00:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 138 times

Last updated: Mar 25 '16