Skip to content

Spin TransformListener internal node callback groups - #969

Open
ktyang512 wants to merge 1 commit into
ros2:jazzyfrom
ktyang512:fix/transform-listener-default-group-968
Open

ktyang512 wants to merge 1 commit into
ros2:jazzyfrom
ktyang512:fix/transform-listener-default-group-968

Conversation

@ktyang512

Copy link
Copy Markdown

Summary

  • keep the dedicated /tf and /tf_static callback group registered with the
    listener's private executor
  • also register the listener-owned internal node so its automatically added
    default callback group makes progress
  • cover both dynamic and static-only internal listeners while leaving
    caller-owned node handling unchanged

Fixes #968.

Root cause

The simplified TransformListener(buffer) constructor creates a private node.
With spin_thread=true, it creates a non-auto-added callback group for the TF
subscriptions and registers only that group with its private executor. On
Jazzy, the internal node also has a TimeSource parameter-event subscription
in its default callback group, but that group is never spun.

The fix retains the explicit TF callback-group registration and additionally
adds only optional_default_node_. Using add_node() alone would not register
the deliberately non-auto-added TF group.

Testing

  • reproduced the failure before the production change: the nine existing
    listener tests passed and both new dynamic/static cases failed at the
    default-group assertion
  • clean-built pinned Jazzy source for tf2, tf2_msgs, and tf2_ros
  • complete tf2_ros CTest: 14/14 passed
  • targeted transform-listener CTest repeated 10 times: 10/10 passed
  • cppcheck, cpplint, lint_cmake, and uncrustify passed
  • git diff --check passed

The regression publishes a targeted use_sim_time=true parameter event and
checks that the internal node creates its /clock subscription. It also sends
a dynamic or static transform and verifies that the buffer receives it, which
guards the existing manually registered TF callback group.

Scope

The observed TimeSource failure is Jazzy-specific. Current Rolling no longer
creates this parameter-event subscription. No public API, QoS setting, thread
count, caller-owned node path, or spin_thread=false behavior is changed.

Generative tool disclosure

Generated-by: OpenAI Codex (GPT-5)

Keep the dedicated TF callback group registered while also adding listener-owned internal nodes to the executor so their default callback groups make progress. Cover both dynamic and static-only listeners without changing caller-owned node handling.

Generated-by: OpenAI Codex (GPT-5)
Signed-off-by: ktyang512 <ktyang512@gmail.com>
@mergify

mergify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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.

1 participant