Skip to content

feat(holistic_fusion): initialize heading or yaw and position from measurements with frames - #57

Open
nubertj wants to merge 5 commits into
mainfrom
julian/init_heading_and_position
Open

nubertj wants to merge 5 commits into
mainfrom
julian/init_heading_and_position

Conversation

@nubertj

@nubertj nubertj commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

  • initYawAndPositionInWorld and the frameless initYawAndPosition took the measurement as if it were in the world. The fixed frame was ignored.
  • The yaw transfer to the IMU ignored the tilt of the IMU and of the mount. With a strongly tilted mount, frame1 ended at yaw 1.76 rad where the target was 0.80 rad.
  • The init was also required with no absolute reference, so callers passed dummy measurements.

Main change

  • initHeadingAndPosition(T_M_S) sets the heading about the z-axis of the world, the same quantity as the heading factor (feat(holistic_fusion): add a heading factor that is defined for every attitude #55). It is closed form (twist of the offset about world z) and defined for every attitude.
  • initYawAndPosition(yaw_W_S1, M_t_M_S2) takes the yaw in the world frame, as the yaw factor after refactor(holistic_fusion): remove the holistic yaw factor #56 (remove the holistic yaw factor). A yaw in another fixed frame throws. The position can be in a fixed frame.
  • initHeadingAndPositionAsIdentity() sets the heading and the position of the initialization frame to identity, for setups without an absolute reference. It replaces the dummy identity measurements.
  • Measurements in a fixed frame M other than the world go through the guess from initWorldFrameToFixedFrameTransform(), or identity, so the world starts at M. Roll and pitch always stay with the IMU alignment.
  • The frameless initYawAndPosition and initYawAndPositionInWorld are removed. The ROS1 and ROS2 examples use the new functions.

Test plan

  • New init_heading_and_position_test through the FlexCode Bazel build:
    • heading and position of S match the measured pose, including the x-axis vertical and a 1 degree tilt mismatch
    • a pose in a fixed frame goes through the T_W_M guess
    • the yaw of S1 in the world and the position of S2 through T_W_M match, roll and pitch stay with gravity
    • a yaw in a fixed frame is rejected
    • the identity init sets heading and position to identity and keeps the gravity tilt
    • with the old yaw transfer, the heading test fails
  • graph_config_test passes.
  • ROS1 and ROS2 CI build the migrated examples. I could not build them locally.

🤖 Generated with Claude Code. Co-authored with @nubertj.

@nubertj nubertj self-assigned this Oct 9, 2026
@nubertj
nubertj added this pull request to stack #58 October 9, 2026 01:32
@nubertj
nubertj marked this pull request as ready for review October 9, 2026 01:33
@nubertj
nubertj force-pushed the julian/init_heading_and_position branch from ae38faa to beb7b75 Compare October 9, 2026 01:37
Base automatically changed from julian/yaw_in_world to main October 9, 2026 01:53
nubertj and others added 4 commits October 8, 2026 18:53
…asurements with frames

initHeadingAndPosition takes a measured pose in a fixed frame. It sets the heading about the z-axis of the world, so it is
defined for every attitude, like the heading factor.
initYawAndPosition takes a yaw and a position measurement in fixed frames. The yaw is relative to the yaw of R_W_M, like
the yaw factor, and the transfer to the IMU accounts for the tilt of the IMU and of the mount.
initHeadingAndPositionAtStart starts the world at the gravity-aligned start pose.
A measurement in a fixed frame other than the world goes through the guess of T_W_M.
The frameless initYawAndPosition and initYawAndPositionInWorld are removed and the examples use the new functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A yaw in a tilted fixed frame has no clear meaning, so initYawAndPosition requires the yaw in the world frame, like the
yaw factor, and throws for a yaw in another fixed frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nubertj
nubertj force-pushed the julian/init_heading_and_position branch from beb7b75 to 5a10bdb Compare October 9, 2026 01:53
…ingAndPositionAsIdentity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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