Skip to content

6. Odometry ​

FAST-LIO, a LiDAR-inertial odometry, gives the robot’s motion (/Odometry); the X30’s leg odometry from the motion host is the second opinion. x30_odometry holds FAST-LIO back until the robot stands still, and watches it while it runs.

6.1 The start gate ​

FAST-LIO takes gravity and the IMU’s biases from its first second of data. Started while the robot walks, sways or stands on a slope, its frame is tilted and every height of the stack is wrong with it. wait_still starts FAST-LIO only once the IMU has been still for still_sec (2 s):

ConditionDefaultMeaning
max_gyro_rad_s0.03 rad/sno turning
max_acc_rel_std0.01$\sigma(
max_tilt_deg3°gravity within 3° of the IMU’s z axis: standing level
min_samples20IMU samples in the window
timeout_sec60 sthen start anyway, with an error in the log

Start on the dock

The robot standing on its dock, sitting or standing still, passes the gate in two seconds. On a slope above 3° the gate waits for its timeout: start the robot on level ground.

6.2 The monitor ​

odometry_monitor_node publishes odometry/status: OK, DEGRADED or LOST, with the reason. The health monitor makes LOST an error and DEGRADED a warning.

StateWhen
LOSTno pose for stale_sec (0.5 s); a jump or a restart, for hold_sec (5 s) after it
DEGRADEDthe speed residual alarms; the odom frame tilted against gravity by more than tilt.max_deg (measured while still); $
OKnone of these

6.2.1 Jumps and restarts ​

A step between two poses is a jump when it is longer than jump.min_step_m (0.3 m) and faster than jump.speed_factor times the robot’s speed limit: no gait covers it. A restart is a message gap of restart.gap_sec followed by a pose at the origin (within origin_radius_m and origin_yaw_deg): FAST-LIO began again, and every pose in odom before it is meaningless (Chapter 7).

6.2.2 The speed residual ​

FAST-LIO’s speed, from its poses over window_sec, is compared with the leg odometry’s planar speed. The residual, normalized by both uncertainties, is a χ2 sample with one degree of freedom:

(6.1)r=vLIO−vleg,χ2=r2σLIO2+σleg2

One sample means little (the legs slip, the gait sways), a persistent disagreement means a lot. A one-sided CUSUM accumulates the excess over κ and alarms above h:

(6.2)sk=min(2h, max(0, sk−1+χk2−κ)),alarm while sk>h

With κ=3.84 (the 95 % point of χ12), h=20, σLIO=0.05m/s and σleg=0.15m/s:

  • a residual below κ(σLIO2+σleg2)=0.31m/s never alarms, however long it lasts;

  • a residual of 0.5 m/s adds 10.0−3.84=6.2 per pose and alarms at the fourth;

  • the cap 2h bounds the recovery: after the disagreement ends, the alarm clears within a few poses.

  • Raise σleg on gravel, mud or wet grass, where the legs slip: false alarms vanish, real ones come later.
  • Lower h to catch a degenerate FAST-LIO (a featureless yard, a long uniform wall) sooner, at the cost of more alarms on rough ground.

6.3 The trip meter ​

odometry/trip counts the distance, the moving time and the speeds from FAST-LIO’s poses since the last reset (odometry/trip_reset, the app’s long press). Motion is counted in steps of step_m, so the sway of a standing robot adds nothing; a speed above max_mps is a jump, not a trip.