launch icon indicating copy to clipboard operation
launch copied to clipboard

launch_ros_PID collisions in multi-host systems

Open dawonn-haval opened this issue 4 years ago • 3 comments

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: image

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?

dawonn-haval avatar Jul 19 '20 14:07 dawonn-haval

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?

image

dawonn-haval avatar Jul 21 '20 01:07 dawonn-haval

I would reuse the logic here.

@dawonn-haval are you planning to open a PR addressing this?

ivanpauno avatar Jul 21 '20 15:07 ivanpauno

Is on my list of things to eventually get to, although I'm not sure exactly when that will be...

dawonn avatar Jul 21 '20 16:07 dawonn