Odometry with better contact model#860
Open
Flova wants to merge 7 commits into
Open
Conversation
MegaIng
requested changes
May 23, 2026
| motion_odometry::ParamListener param_listener_; | ||
| motion_odometry::Params config_; | ||
|
|
||
| // Returns {contact_corner_frame, sole_frame} of the foot with the lowest corner in IMU world space. |
Contributor
There was a problem hiding this comment.
This comment is not accurate, lowest corner for both foots are returned right now.
| return {lowest_corner_l, lowest_corner_r, support_state}; | ||
| } | ||
|
|
||
| tf2::Transform MotionOdometry::getFootContactModelResult(const rclcpp::Time& time, |
Contributor
There was a problem hiding this comment.
Since the time parameter is currently being ignored, it should not be part of the signature. Alternatively keep the parameter, use it and set it to 0 externally with explanation.
| tf_buffer_.lookupTransform(imu_frame_, base_link_frame_, rclcpp::Time(0)); | ||
| fromMsg(imu_mounting_transform.transform, imu_mounting_offset); | ||
| } catch (tf2::TransformException& ex) { | ||
| RCLCPP_ERROR(this->get_logger(), "Not able to fuse IMU data with odometry due to a tf problem: %s", ex.what()); |
Contributor
There was a problem hiding this comment.
Why is this error state specifically protected? Also, isn't this an essentially static lookup that just depends on the URDF? Under what conditions might this fail?
| odom_to_base_link_ = odom_to_rotation_point * rotation_point_in_base_link.inverse(); | ||
|
|
||
| // Just to be sure, we set the rotation to the current imu orientation | ||
| odom_to_base_link_.setRotation(imu_orientation_in_base_link); |
Contributor
There was a problem hiding this comment.
Am I reading this correctly that we always use the IMU rotation and trust it without any input from the odometry? Not necessarily bad, just want to make sure.
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.
Summary
Reworking the odometry from scratch to include a better phase detection, detailed foot contact modeling and fused imu data.
Proposed changes
Checklist
pixi run build