Skip to content

Isolate TfBuffer internal node from global __node remap#51

Closed
otamachan wants to merge 1 commit into
mainfrom
nishino/tf-buffer-ignore-global-node-remap
Closed

Isolate TfBuffer internal node from global __node remap#51
otamachan wants to merge 1 commit into
mainfrom
nishino/tf-buffer-ignore-global-node-remap

Conversation

@otamachan

Copy link
Copy Markdown
Owner

The TfBuffer TF listener node was created with default NodeOptions (use_global_arguments == true) and a fixed name "_tf_listener". When a component container is launched with a global node-name remap, e.g.
--ros-args -r __node:=my_container
every TfBuffer-created listener inherited that remap and was renamed to the container's name. With one listener per TfBuffer-using component this caused duplicate node names and "Publisher already registered for node name" rosout warnings.

Give the internal node use_global_arguments(false) so it ignores the CLI __node remap, and derive its name from the host node (_tf_listener) so concurrent listeners don't collide.

Add a regression test that launches with a global __node remap and asserts, via the node graph, that the internal node is uniquely named after the host and does not adopt the remapped name.

The TfBuffer TF listener node was created with default NodeOptions
(use_global_arguments == true) and a fixed name "_tf_listener". When a
component container is launched with a global node-name remap, e.g.
  --ros-args -r __node:=my_container
every TfBuffer-created listener inherited that remap and was renamed to the
container's name. With one listener per TfBuffer-using component this caused
duplicate node names and "Publisher already registered for node name"
rosout warnings.

Give the internal node use_global_arguments(false) so it ignores the CLI
__node remap, and derive its name from the host node (<host>_tf_listener)
so concurrent listeners don't collide.

Add a regression test that launches with a global __node remap and asserts,
via the node graph, that the internal node is uniquely named after the host
and does not adopt the remapped name.
@Timple

Timple commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Just curious, why is there an extra node for tf lookups?

Typically I would find this an anti-pattern.
Can't the existing node be used?

@otamachan

Copy link
Copy Markdown
Owner Author

You're right.
I'll refactor to that and drop the extra node. Thanks!

@otamachan otamachan closed this Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants