Skip to content

Parameterize odom and body frame IDs#74

Open
haasithp wants to merge 1 commit into
Ericsii:ros2from
haasithp:ros2
Open

Parameterize odom and body frame IDs#74
haasithp wants to merge 1 commit into
Ericsii:ros2from
haasithp:ros2

Conversation

@haasithp
Copy link
Copy Markdown

@haasithp haasithp commented Apr 4, 2026

Summary

This PR replaces the hardcoded TF frame names (camera_init and body) in laserMapping.cpp with ROS 2 parameters. This solves a major pain point by allowing the package to integrate seamlessly into standard robot TF trees (like setting them to odom and base_link) without modifying the source code.

Changes Made

  1. Dynamic Frame Variables: Added odom_frame and body_frame variables to laserMapping.cpp to handle TF broadcasts and PointCloud frame IDs dynamically instead of relying on string literals.
  2. ROS 2 Parameters: Exposed common.odom_frame and common.body_frame via the parameter server.
  3. Reference Config Updated: Added the new parameters to the reference avia.yaml config template so users know how to configure them without guessing.

Backward Compatibility

Fully preserved.
We used get_parameter_or to ensure the defaults perfectly match the old hardcoded values (camera_init and body). Existing users and datasets will experience no changed behavior, and the avia.yaml template uses the exact same frames as before.

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