0
$\begingroup$

Rosanswers logo

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.


Originally posted by chrisalbertson on ROS Answers with karma: 136 on 2017-06-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ahendrix with karma: 47576 on 2017-06-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by chrisalbertson on 2017-06-20:
Thanks, I suspected they were peer to peer but was afraid I'd have to write my own relay node.

$\endgroup$

Your Answer

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