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

How to configure ROS networking to minimise packet broadcast redundancies?

asked 2019-03-21 04:40:48 -0500

LukeAI gravatar image

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?

edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-21 05:28:20 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-03-21 05:27:15 -0500

gvdhoorn gravatar image

updated 2019-03-21 05:48:57 -0500

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-03-21 04:40:48 -0500

Seen: 326 times

Last updated: Mar 21 '19