Ask Your Question

ROS2 max domain ID

asked 2019-03-12 12:31:47 -0500

alsora gravatar image

updated 2019-03-12 12:40:37 -0500


I was experimenting with the environment variable ROS_DOMAIN_ID.

In several places in the ROS2 tutorials, it is suggested to set it to a value in the range 0-100.

Moreover I found this issue on FastRTPS, where they specify a limit of 232

That limit is also present in the Opensplice and Connext documentations.

However with FastRTPS, differently from the other DDS, I am able to use way bigger values. The only limit I got is the one of the unsigned long which is used by RCL to store this environment variable.

OpenSplice and Connext throw a runtime error when I use a value higher than 232.

FastRTPS allows me to communicate with a different machine under the same network using much bigger values.

What is going on? Is there a sort of overflow which causes me to use the same ports that I would use with a much lower domain id ?

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-12 17:23:28 -0500

William gravatar image

It's used to calculate a UDP port, so it could be that it is wrapping around and reusing ports if the number is in the right range.

I'd recommend using only values between 0 and 232 or perhaps lower. If you think a number you're using should not work, but is, I'd recommend opening an issue against Fast-RTPS. The issue you linked was that it was not working in certain ranges, which was expected. What you have is that it is working outside of the range you think it should, which may still be a bug.

edit flag offensive delete link more


alsora gravatar image alsora  ( 2019-03-13 07:34:56 -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: 2019-03-12 12:31:47 -0500

Seen: 1,143 times

Last updated: Mar 12 '19