Humanoid State Estimation ← back to dashboard

▍ Stage 5 — Closed-Loop Navigation

estimator → planner → command4/4 waypointson the estimate5b: 3-circuit showdown

The capstone slice: the robot walks to a sequence of waypoints using only its own onboard state estimate, closing the loop sensors → estimator → waypoint planner → VelocityCommand → gait steering — the same command interface the real control stack accepts. The follow-up showdown below (5b) then stresses this loop the way the earlier stages predict it breaks: three circuits, VIO fused inside the loop, and injected transport latency — naive vs delay-compensated.

The loop

Every control step the ESKF ingests the onboard sensors and reports a pose; a WaypointNavigator turns that pose into a body-frame VelocityCommand(vx, vy, vyaw) toward the active waypoint, which steers the walking gait. Because the planner sees only the estimate, estimation error surfaces directly as navigation error — which is exactly why an accurate estimator matters for navigation.

Navigating on the onboard estimate
The robot reaches all four waypoints from its own ESKF estimate (cyan). The true path (orange) bulges outward: that gap is the ESKF's unobservable yaw drift accumulating over the turns.
The robot reaches all four waypoints from its own ESKF estimate (cyan). The true path (orange) bulges outward: that gap is the ESKF's unobservable yaw drift accumulating over the turns.
4/4
waypoints reached
14.6 s, 12 m path
7.1 cm
est-vs-truth at finish
0.59% of path
yaw drift
the error source
ESKF cannot observe it
The through-line

The estimated and true paths diverge because heading is unobservable from IMU + contact alone — the same limitation Stage 1 diagnosed and Stage 2's VIO fixes. Navigation makes the consequence concrete and visible: a few degrees of yaw drift becomes tens of centimeters of position error at the goal.

Continuous 3-lap drift with a realistic uncalibrated IMU bias: leg-odometry and the ESKF accumulate unbounded yaw drift (17° / 7°), while VIO stays bounded at ~1° across all three laps as vision keeps pinning the yaw-axis bias. Position error (right) oscillates over the closed loop.
Continuous 3-lap drift with a realistic uncalibrated IMU bias: leg-odometry and the ESKF accumulate unbounded yaw drift (17° / 7°), while VIO stays bounded at ~1° across all three laps as vision keeps pinning the yaw-axis bias. Position error (right) oscillates over the closed loop.

And the VIO-over-ESKF win is robust, not a lucky seed: across 5 seeds VIO beats the ESKF on drift and gyro-z bias on every one (median 0.15% vs 0.49%; bg,z 0.19 vs 1.66 mrad/s).

TakeawayThe whole project reads as one arc — leg-odometry and IMU drift in yaw, VIO anchors it, self-calibration keeps the sensors honest, the embedded-noise study says timing is what breaks on hardware, and navigation closes the loop and shows why every earlier stage mattered.
Stage 5b — the closed-loop showdown (3 circuits)

The follow-up stresses the loop the way the earlier stages predict it breaks: the same 3-circuit waypoint course (12 waypoints, ~45 s, ~38 m) driven by four estimator configurations, each navigating on its own estimate — the clean-timing ESKF; VIO in the loop (head-cam frames rendered inside the control loop at the 2 Hz keyframe cadence and fused as in Stage 2); and 5 ms transport latency + 2 ms CAN stagger applied online, fused naively vs through the Stage-4b buffer-and-replay filter steering on its now-cast. Same seed throughout.

Metric honesty first: the headline numbers are the true closest approach to each waypoint and the estimate-vs-truth gap over time. Final-position error is deliberately not reported as a headline — the course returns home, so closing geometry flatters it. And a closed navigation loop hides estimator damage by construction: the planner continuously re-aims at the goal as it believes it to be, so waypoint success stays high while the truth quietly walks away — the gap and yaw columns are where the damage shows.

The estimate-vs-truth gap over time — what the planner does not know. The shared spike at ~3 s is the first hard 90° pivot (turn slip), common to all runs. Naive latency (amber) runs the widest gap and the most terminal yaw; replay compensation (green) sits back on the clean baseline.
The estimate-vs-truth gap over time — what the planner does not know. The shared spike at ~3 s is the first hard 90° pivot (turn slip), common to all runs. Naive latency (amber) runs the widest gap and the most terminal yaw; replay compensation (green) sits back on the clean baseline.
configurationwaypointstimeworst true closest-approach per circuit (cm)mean (cm)est-gap med / max (cm)terminal yaw err
ESKF · clean timing12/1244.4 s40.0 / 29.8 / 36.323.532.3 / 83.63.6°
VIO in the loop (2 Hz keyframes)12/1244.1 s40.3 / 32.5 / 37.924.330.6 / 76.73.7°
ESKF · 5 ms latency + stagger, naive12/1243.9 s36.3 / 34.6 / 31.822.530.6 / 86.35.7°
ESKF · same latency, replay-compensated12/1244.4 s37.6 / 25.8 / 33.622.029.3 / 76.23.7°
12/12
every configuration completes
3 circuits · ~44 s · seed 0
5.7° → 3.7°
terminal yaw · naive → replay
replay restores the clean number
98°
terminal yaw at σ_c = 0.05
10/12 — the real closed-loop killer
28
vision updates fused in-loop
151 keyframes · turns break tracks

Three honest findings. (1) The decisive variable was not on the matrix. A baseline check (data/nav5b_eskf005_check.npz) ran the course with run_nav.py's short-path contact trust σc = 0.05: over three circuits of repeated 90° pivots the Stage-2 turn-slip bg runaway accumulates and the run fails — 10/12 waypoints, a 6.9 m peak gap, 98° of terminal yaw error. In-loop VIO rescues that mistuned filter (12/12 at 17°), and simply loosening to σc = 0.15 — the Stage-2 lesson — fixes it outright; the matrix above runs 0.15 everywhere. (2) 5 ms of latency is survivable in closed loop — but it is not free: the naive run finishes the course, yet carries ~54% more terminal yaw error and the widest gap excursions; replay compensation returns every column to the clean baseline, consistent with the open-loop Stage-4b result. (3) In-loop VIO adds little on this course: at the 2 Hz keyframe cadence the sharp pivots break KLT tracks (37 measurements, 28 fused, in 151 keyframes — even with a gyro-seeded LK initial guess), and 44 s at σc = 0.15 accrues only ~3.6° of yaw for it to fix. Vision earns its keep on long horizons (the 3-lap monitor above) and as the rescue in finding 1 — not on a well-tuned short course.

TakeawayClosed-loop navigation grades on a curve — re-aiming hides estimator error, so success metrics must be chosen adversarially (true closest approach, est-vs-truth gap, terminal yaw). On those metrics the stack holds: replay compensation neutralizes injected latency in the loop, and the one configuration that truly fails is the one that over-trusts its contact model — the same lesson Stage 2 taught, now with a navigation-grade price tag.