launch
launch copied to clipboard
launch_ros_PID collisions in multi-host systems
Bug report
The launch_ros node uses the PID as a suffix to generate a 'unique' node name, but this is insufficient in multi host systems. I use docker swarm containers across a number of hosts with many name collisions:
Required Info:
- Operating System: U20.04
- Installation type: Binary (mostly...)
- Version or commit hash: Foxy
- DDS implementation: FAST_RTPS
- Client library (if applicable): N/A
Steps to reproduce issue
Launch ROS nodes on multiple hosts at system startup, or via a docker swarm.
Expected behavior
ros2 node list
should have no warnings.
Actual behavior
WARNING: Be aware that are nodes in the graph that share an exact name, this can have unintended side effects.
Additional information
I wonder if we can simply use a random alpha-numeric suffix instead?
https://github.com/ros2/geometry2/blob/ros2/tf2_ros/src/static_transform_broadcaster_node.cpp#L41
Stumbled upon how the static_transform_publisher generates a random suffix. Should this be adopted here as well?
Is on my list of things to eventually get to, although I'm not sure exactly when that will be...