Skip to content

Create the ROS 2 TF listeners on activate to stop lifecycle test hangs - #323

Merged
rsasaki0109 merged 1 commit into
masterfrom
fix/ros2-tf-listener-lifecycle
Nov 21, 2026
Merged

rsasaki0109 merged 1 commit into
masterfrom
fix/ros2-tf-listener-lifecycle

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

Summary

cuda_voxel_mapping's lifecycle_configuration_test still hangs in ConfiguresWithoutAllocatingGpuRuntime and times out after 60 s. It hung again on #322 after #321 serialized the tests, with the other packages passing, so the cause is in the node rather than in test interference.

  • Cause: on_configure() created a tf2_ros::TransformListener with its own spin thread, and the test's cleanup() destroyed it immediately. If the listener is destroyed right after it is created, its executor can be cancelled before the thread starts spinning; the thread then spins forever and the destructor's join never returns.
  • Fix: the voxel mapper and KISS-ICP nodes only look up transforms while active, so they now create the TF buffer and listener in on_activate and release them in on_deactivate. release_runtime() still resets them on cleanup, shutdown and error.
    • KISS-ICP's broadcaster stays in configure; it has no thread.
  • The pinned hash of cuda_voxel_mapper_node.cpp in the systems-paper stack_source_contract is refreshed.

Test plan

  • test_cudanav_contract.py, validate_paper_artifacts.py, test_systems_paper_bundle.py and test_cudanav_real_gpu_stack.py pass locally.
  • ROS2 CUDA MPPI compile job passes, and passes again on re-runs, since the hang was intermittent.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ALg7o339S7Rpi9hd751Cbt

cuda_voxel_mapping's lifecycle_configuration_test still hangs in
ConfiguresWithoutAllocatingGpuRuntime after #321 serialized the tests, so the
hang is in the node, not in test interference. configure() built a
tf2_ros::TransformListener with its own spin thread and the test's cleanup()
destroyed it immediately; destroying a just-created listener can cancel its
executor before the thread starts spinning, after which the join never
returns. The voxel mapper and KISS-ICP nodes only look up transforms while
active, so they now create the buffer and listener on activate and release
them on deactivate (and still on cleanup/shutdown/error). The systems-paper
stack contract hash for the voxel node is refreshed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALg7o339S7Rpi9hd751Cbt
@rsasaki0109
rsasaki0109 merged commit 185f828 into master Nov 21, 2026
9 checks passed
@rsasaki0109
rsasaki0109 deleted the fix/ros2-tf-listener-lifecycle branch November 21, 2026 08:12
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