0
$\begingroup$

Rosanswers logo

We have three physical machines: A, B and logger. A and B actively publish to various topics and logger subscribes to everything that A and . The plan is to network them together through a single router/switch running DHCP.

My understanding of how ROS on top of DHCP will work is that each time A publishes to a topic that B and logger are subscribed to - the information in that message will be encoded into TCP packets and transmitted to the router/switch twice - once for each subscribing machine’s IP address.

This strikes me as rather wasteful - a more efficient, ideal situation would be: A publishes to a topic, the message is encoded into TCP packets with the subnet broadcast address, this packet transmits once to the router/switch and is relayed to both B and logger. Given that 100% of messages being sent over the network should be received by every other machine on the network this would double the effective available bandwidth.

Could such a networking scheme be practically configured and if so, how?


Originally posted by LukeAI on ROS Answers with karma: 131 on 2019-03-21

Post score: 0


Original comments

Comment by gvdhoorn on 2019-03-21:\

My understanding of how ROS on top of DHCP

should this read: "on top of TCP"?

Also note: if that is the case, then it's only partly correct: ROS supports both UDP and TCP (although UDP support in rospy is not complete).

minimise packet broadcast redundancies

As broadcasting is not used in the default ROS transports, I'm wondering what you mean by this.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Given that 100% of messages being sent over the network should be received by every other machine on the network this would double the effective available bandwidth.

you are ignoring some things here, such as packet loss, processing delay in the subscribers (with resulting message loss) and other factors that will affect your dataflows. That makes this significantly more complex than you describe here.

A publishes to a topic, the message is encoded into TCP packets with the subnet broadcast address

I may be not completely up-to-date, but I don't believe TCP can be used to broadcast traffic. TCP is connection based and requires ACKs for every packet transmitted. That would get rather complex with a (potentially) unlimited nr of recipients of each message sent by the publisher (also: what would something like 'window size' mean with a 1000 receivers?)

What you're looking for I believe is multicast, and that is typically done using UDP.

One example of a transport that supports this would be ethzasl_message_transport, but I'm not sure of the state of that. Note also the trade-offs: reliable UDP multicasting is not trivial and I'm not sure whether there is a ready-to-be-reused package that can do that with ROS.


Originally posted by gvdhoorn with karma: 86574 on 2019-03-21

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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