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

[ROS2] how to keep messages from leaving the machine

asked 2018-11-04 21:08:56 -0600

talos gravatar image

I'm enjoying ROS2 so far, but one major issue is that the UDP broadcasting slams the network when sending things like images/pointclouds. Most of the time I'm running on one machine and don't want packets to even leave that machine. Is there a way other than manually configuring tables to tell a node or set a flag that keeps packets on the machine?

edit retag flag offensive close merge delete



Which middleware are you using? By default I think most use unicast UDP (so using the ROS_DOMAIN_ID works fine there), but multicast UDP for data is possible too. In which case you might need to adjust the TTL for the multicast addresses being used, so that they do not leave the machine.

William gravatar image William  ( 2018-11-05 12:23:08 -0600 )edit

The default EProsima DDS. Maybe I'm incorrect in thinking it was multicast? I only was concerned because our IT guy sent us an email detailing the increase in data over the network from my machine...

How can I adjust the TTL?

talos gravatar image talos  ( 2018-11-05 12:39:04 -0600 )edit

Yes, the default is eProsima's Fast-RTPS (not technically a DDS implementation, just the wire protocol). Even if the message data (images/pointclouds) are not being sent over multicast, the discovery information is being sent over multicast.

William gravatar image William  ( 2018-11-05 12:43:57 -0600 )edit

There isn't a way to just change the TTL for ROS 2 at the moment, I had proposed a way to do this in this issue: but since Fast-RTPS at the time, and I assume still now, does not use multicast for data, I closed it.

William gravatar image William  ( 2018-11-05 12:44:57 -0600 )edit

It should be possible to change the TTL in your machine's firewall, though that will prevent discovery as well and perhaps affect other things like discovering network printers, etc. Which OS are you on?

William gravatar image William  ( 2018-11-05 12:48:05 -0600 )edit

But at this point we're just guessing at why you're traffic is increased, so you might want to have a look at Wireshark and see what's actually getting sent over the network.

William gravatar image William  ( 2018-11-05 12:49:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-05 11:25:45 -0600

Dirk Thomas gravatar image

Actual data is only sent over the network when there is a discovered subscriber of that data. If you want to separate different machine within the same subnet you can set the environment variable ROS_DOMAIN_ID to different numbers on each machine:

edit flag offensive delete link more

Question Tools



Asked: 2018-11-04 21:08:56 -0600

Seen: 740 times

Last updated: Nov 05 '18