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

[ROS2] how to keep messages from leaving the machine

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

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

Comments

1

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 -0500 )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 -0500 )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 -0500 )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: https://github.com/ros2/rmw_fastrtps/... 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 -0500 )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 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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: https://index.ros.org/doc/ros2/Linux-...

edit flag offensive delete link more

Question Tools

3 followers

Stats

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

Seen: 813 times

Last updated: Nov 05 '18