Humanoid State Estimation ← back to dashboard

▍ IMU 101 — From Raw Signals to a Pose

inertial navigationwhy yaw driftsthe fusion idea

The conceptual bedrock of the whole project: what an IMU actually measures, how you turn it into orientation and position, and why heading is the one thing it can never pin down on its own. Read this first and stages 0–5 all click into place.

What the IMU actually measures — not orientation, not position
Gyroscope
how fast you are rotating, about each body axis. A rate, not an angle.
ω  (rad/s)
Accelerometer
your proper acceleration — your motion minus gravity, in the body frame. At rest it reads the 9.81 push of gravity, pointing “up”.
f = a − g  (m/s²)

Neither is orientation or position. You get those only by integrating — and integration is where the trouble starts.

Turning it into a pose — and where it drifts
gyro → orientation
integrate the angular rate over time.
R ← R · Exp(ω·dt)
→
but it DRIFTS
bias + noise accumulate every step; orientation slowly wanders with nothing to check it.
accel → gravity → tilt anchor
when you are not accelerating hard, the accelerometer points along gravity — an absolute “down” that snaps roll & pitch back. ✓
→
…but nothing for yaw
gravity is vertical, so it says nothing about rotation about vertical.
accel → position
rotate to world, subtract gravity, double-integrate.
p ← ∫∫ (R·f + g) dt²
→
drifts FAST
double-integrating noise grows the error like t^1.5–t² — useless within seconds without help.
Why yaw is the hard one

It is the gravity reference. Tilt the robot and gravity shows up in the “wrong” accelerometer axes, so the filter can always correct roll and pitch — they are observable, they don’t drift. But spin about the vertical axis (yaw / heading) and gravity doesn’t move at all — the accelerometer gives zero information about it. Yaw can only come from the drifting gyro. No gravity-equivalent heading reference exists in the IMU — until a camera watches the world turn.

roll / pitch
observable
gravity anchors them
yaw
unobservable from IMU
no reference → drifts
position
drifts fastest
needs legs + vision
Where legs and the camera come in — the whole project in one arrow
Legs (Stage 1)
a planted foot is a fixed anchor → gives velocity. But leg motion is in the body frame; placing it in the world needs your heading. Legs depend on yaw — they can’t fix it.
→
Camera (Stage 2)
watching fixed features rotate gives an independent rotation the IMU can’t — it finally pins the yaw drift + the gyro-z bias.
The one ideaEvery stage is the same move: integration drifts, so add a reference that bounds it — gravity for tilt, a planted foot for velocity, the camera for heading, and (Stage 3) the camera calibrating itself. That is the entire arc.