Skip to content

Odometry with better contact model#860

Open
Flova wants to merge 7 commits into
mainfrom
feature/new_odom
Open

Odometry with better contact model#860
Flova wants to merge 7 commits into
mainfrom
feature/new_odom

Conversation

@Flova
Copy link
Copy Markdown
Member

@Flova Flova commented May 17, 2026

Summary

Reworking the odometry from scratch to include a better phase detection, detailed foot contact modeling and fused imu data.

Proposed changes

  • Drop odometry fuser
  • Determine phase inside the odometry, considering imu data and propreoception to determine which contact point on which foot is in contact
  • Model movement around contact points to better handle "rolling motions" during walking
  • Integrate odometry fuser into joined node to rotate the robot around this now very detailed contact point estimate

Checklist

  • Run pixi run build
  • Write documentation
  • Test on your machine
  • Test on the robot
  • Create issues for future work
  • Triage this PR and label it

@github-project-automation github-project-automation Bot moved this to 🆕 New in Software May 17, 2026
@Flova Flova moved this from 🆕 New to 👀 In review in Software May 17, 2026
@Flova Flova added navigation enhancement New feature or request labels May 17, 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.
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.

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,
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.

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());
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.

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);
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.

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.

@github-project-automation github-project-automation Bot moved this from 👀 In review to 🏗 In progress in Software May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request navigation

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants