Ensure Odom Message Has Proper Frames - #34
Open
kethan1 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the ROS 2 driver’s nav_msgs/msg/Odometry publication to populate child_frame_id, enabling consumers (notably robot_localization) to correctly interpret/transform the twist portion of the message.
Changes:
- Set
odom_msg_.child_frame_idduring lifecycle configure using the node’s configuredframe_idparameter.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Changes Made
This PR sets the child_frame_id field of the odom message to the appropriate frame passed via the node's parameters.
Associated Issues
As outlined at https://docs.ros.org/en/melodic/api/robot_localization/html/preparing_sensor_data.html,
odom_msg.header.frame_idis used for pose data, whileodom_msg.child_frame_idis used for twist data with robot_localization.Being able to have the twist data transformed is useful when setting up the odom, base_link, and dvl frames to transform dvl data from FRD -> FLU for consistency with ROS2 convention.
Testing
Tested with a Water Linked a50 DVL in a pool.