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

Are messages sent once over a network or once per subscriber?

asked 2017-06-20 11:29:36 -0600

chrisalbertson gravatar image

I'm looking for a general answer because this issue is going to come up all the time but here is the specific version of my question:

I have a mobile base with a stereo camera. It sends SensorData/Image over a WiFi network to a server class PC that runs two nodes that each subscribe to SensorData/Image. Is the image data sent twice across the WiFi network?

If the data is sent twice is there a built-in solution or must I write a kind of node that collects and resends these messages. In other words, insure that I have only one subscriber to each message type on the Server PC.

In general, when using a limited bandwidth network link how to make sure messages are sent only once over the link no matter the number of subscribers. Perhaps the infrastructure already takes care of this, but I don't see WHERE this could be happening.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-20 15:18:11 -0600

ahendrix gravatar image

Yes; connections between publishers and subscribers are peer-to-peer, and each message is sent to each subscriber separately.

The relay node can be used to subscribe to a topic and re-publish it with a new name; you can run this on your server and then make any local nodes subscribe to the republished topic so that your image data only moves over wifi once.

edit flag offensive delete link more

Comments

Thanks, I suspected they were peer to peer but was afraid I'd have to write my own relay node.

chrisalbertson gravatar image chrisalbertson  ( 2017-06-20 19:03:15 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-06-20 11:29:36 -0600

Seen: 247 times

Last updated: Jun 20 '17