ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

multiple network interfaces with rmw_cyclonedds_cpp

asked 2021-04-03 14:14:33 -0500

leuko gravatar image

updated 2021-04-03 14:15:19 -0500

I'm using ROS2 foxy and switched from FastDDS to Cyclone DDS as middleware. Since then I get the following warning when I run ros2 topic list:

ros2: using network interface enp... (udp/...) selected arbitrarily from: enp..., tun0

I can select the correct interface by:

export CYCLONEDDS_URI='<CycloneDDS><Domain><General><NetworkInterfaceAddress>tun0</></></></>

Still I wonder why I do not have to select any interface manually for FastDDS but for Cyclone DDS. Does Cyclone DDS lack a feature?

edit retag flag offensive close merge delete


Note that NetworkInterfaceAddress is deprecated now. NetworkInterface seems to be the replacement.

AndyZe gravatar image AndyZe  ( 2022-10-04 09:14:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-16 02:58:54 -0500

eboasson gravatar image

Still I wonder why I do not have to select any interface manually for FastDDS but for Cyclone DDS. Does Cyclone DDS lack a feature?

That's simple: different choices and different histories. Cyclone DDS has a long history where it made sense once upon a time to stick to a single interface, and while it has since gained the ability to use multiple interfaces, the default behaviour hasn't been changed (yet). I don't know about the ancient past of Fast-DDS, but today it defaults to using all interfaces at the same time and allows you to restrict the set of interfaces if you don't want to use them all.

Both defaults have merits. Being a bit restrictive about the interfaces you use and trying to force the user to pick the correct one(s) if it isn't obvious means you avoid advertising addresses at which you're supposedly reachable that don't actually work (e.g., NAT boxes and link-local addresses are nasty) and have an easier time dealing with 100 network interfaces (I have seen that ...), but the price you pay is that there are cases that would've worked out of the box if you'd gone "happy-go-lucky".

All considered, I think "happy-go-lucky" is the better choice these days, so Cyclone DDS's default will likely change.

edit flag offensive delete link more


The fact this is different behavior between vendors is confusing. In galactic, cyclone no longer seems to give that warning. I had to conduct some network captures to realize it was picking a certain interface.

RFRIEDM_Trimble gravatar image RFRIEDM_Trimble  ( 2022-05-04 23:34:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-04-03 14:14:33 -0500

Seen: 1,035 times

Last updated: Jun 16 '21