Skip to content

Re-use the main filter node for the tf2_ros::MessageFilter TransformListener - #259

Merged
jonbinney merged 1 commit into
ros-perception:rollingfrom
Hugal31:feat/dont-spawn-tf-none
May 14, 2026
Merged

Re-use the main filter node for the tf2_ros::MessageFilter TransformListener#259
jonbinney merged 1 commit into
ros-perception:rollingfrom
Hugal31:feat/dont-spawn-tf-none

Conversation

@Hugal31

@Hugal31 Hugal31 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

The TransformListener recommends to re-use a node when possible.

This avoids spawning a new node uselessly.

By the way, I think we could also pass spin_thread=false in this specific use case, since we don't use the timeout mechanism.

This avoids spawning a new node uselessly.
@jonbinney

Copy link
Copy Markdown
Contributor

Interesting.... in the old code, after launching, do you see the extra node running (e.g. with ros2 node list)?

@Hugal31

Hugal31 commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

Yes

> ros2 run laser_filters scan_to_scan_filter_chain --ros-args -p tf_message_filter_target_frame:=foobar &
> ros2 node list
/scan_to_cloud_filter_chain
/transform_listener_impl_63ec3974c7c0

@jonbinney jonbinney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jonbinney
jonbinney merged commit be84c0b into ros-perception:rolling May 14, 2026
3 checks passed
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