[Feature Proposal] Add map to odom TF publishing capability#62
Merged
rsasaki0109 merged 4 commits intorsasaki0109:mainfrom Jul 9, 2025
Merged
[Feature Proposal] Add map to odom TF publishing capability#62rsasaki0109 merged 4 commits intorsasaki0109:mainfrom
map to odom TF publishing capability#62rsasaki0109 merged 4 commits intorsasaki0109:mainfrom
Conversation
Owner
|
Thanks for the PR. I’ll check it later, hopefully one evening this week. |
Owner
|
ref
|
rsasaki0109
approved these changes
Jul 9, 2025
Owner
|
Thank you. Everything looks good, so I’ve merged it. Great PR — thanks a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request adds the capability to publish the
map->odomtransform, complementing the existingmap->base_linktransform.A new parameter,
enable_map_odom_tf, has been added toparam/localization.yaml. Setting this totrueenables the new behavior. Whenfalse(the default), the node maintains its original behavior of publishing themap->base_linktransform.This feature allows for easier integration with standard ROS robot configurations that publish an
odom->base_linktransform (e.g., from wheel odometry), enabling a completemap->odom->base_linkTF chain.Implementation Details
The
map->odomtransform is calculated based on the following formula:Transform(map→odom) = Transform(map→base_link) × Transform(odom→base_link)⁻¹The process is as follows:
map->base_linkpose is estimated via NDT/GICP.odom->base_linktransform is looked up from the TF tree.map->odomtransform is calculated from these two transforms and published.Verification
I verified this feature using a robot that publishes wheel odometry (
odom->base_footprint).1. Original Behavior (
enable_map_odom_tf: false)With an existing
odom->base_footprinttransform, themap->base_linktransform published by this node is not used, resulting in a disconnected TF tree.2. New Behavior (
enable_map_odom_tf: true)With this feature enabled, the node publishes the
map->odomtransform, correctly forming a single, continuous TF chain:map->odom->base_footprint->base_link. This allows the localization result to coexist properly with the robot's odometry.Notes
If you believe this feature would be beneficial to the project, I would appreciate your review and merge.