The K1's odometry comes from the Booster Robotics SDK, which publishes it on rt/odometer_state.
- The Booster HardwareIO module subscribes to
rt/odometer_stateand emits each sample as aBoosterOdometrymessage containingx,yandthetain the odometry world frame. - The Sensors module pairs each
RawSensorsmessage with the latestBoosterOdometry. It stores the first sample as a zero offset and subtracts it from every later sample, so odometry starts at the origin. Values belowodometry_deadbandare set to zero. - Sensors builds
Hwr, the robot's planar pose in the world frame, from the offset-correctedx,yandtheta. Combined with the head pose from the Booster Robotics SDK, this gives the camera poseHcw. Both are emitted in theSensorsmessage for localisation and vision to use.
The odometry is reset in two cases:
- On a mode change: HardwareIO calls the SDK's
ResetOdometry, and Sensors captures a new zero offset from the next sample. - On
ResetFieldLocalisation: both modules do the same, so odometry restarts from the robot's new pose. This also happens after a get-up.
HardwareIO also resets the odometry on startup.