You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When spawning a process that has multiple internal nodes, the __node:=some_node_name argument applies to all nodes in that process. Take, for instance, the TransformListener, which spawns a node to hold its subscription. If multiple TransformListeners are used, those nodes might have different names by default, but passing the command line __node option causes these to get started with the same name.
This makes things like setting arguments, calling services, and sometimes just setting up publishers/subscribers fail in various ways and has been pervasive in the Navigation2 stack: ros-navigation/navigation2#842
A couple possible resolutions:
Handle duplicate node names in the same process more gracefully.
Only respect the global __node option for the first node created in a process.
Make __node only select the prefix to the node name. If multiple nodes are attempted to be created with the same name, append a (sequential?) suffix to uniquify them.
Add a parameter to the Node constructor to ignore the global node name override but respect the other global options. (this doesn't fully solve the problem of unique names, since the node is now responsible for making sure they're globally unique and any API that creates nodes must now enforce it).
Deprecate the global __node option and respect the node name passed to the Node constructor (Then launch_ros.actions.Node will have to use more targeted remapping to ensure that subnodes are
Discussion of a hacky workaround (pass __node argument to internal nodes to override the top-level __node argument) can be found here ros2/geometry2#159
The text was updated successfully, but these errors were encountered:
When spawning a process that has multiple internal nodes, the
__node:=some_node_name
argument applies to all nodes in that process. Take, for instance, theTransformListener
, which spawns a node to hold its subscription. If multipleTransformListener
s are used, those nodes might have different names by default, but passing the command line__node
option causes these to get started with the same name.This makes things like setting arguments, calling services, and sometimes just setting up publishers/subscribers fail in various ways and has been pervasive in the Navigation2 stack: ros-navigation/navigation2#842
A couple possible resolutions:
__node
option for the first node created in a process.__node
only select the prefix to the node name. If multiple nodes are attempted to be created with the same name, append a (sequential?) suffix to uniquify them.__node
option and respect the node name passed to the Node constructor (Thenlaunch_ros.actions.Node
will have to use more targeted remapping to ensure that subnodes areDiscussion of a hacky workaround (pass
__node
argument to internal nodes to override the top-level__node
argument) can be found here ros2/geometry2#159The text was updated successfully, but these errors were encountered: