step.motion.set_odometry_source

Explicitly choose which odometry source should be preferred.

Unlike SpeedMode, odometry-source selection is purely a host-side preference: the HAL keeps publishing internal STM32 odometry at all times, and the calibration board remains secondary unless a caller explicitly prefers it. If the requested source is unavailable, get_active_source() will continue to report the source actually in use.

Classes

SetOdometrySource

Select the preferred odometry source for subsequent pose reads.

Module Contents

class step.motion.set_odometry_source.SetOdometrySource(source: raccoon.hal.OdometrySource)

Bases: step.Step

Select the preferred odometry source for subsequent pose reads.

This does not force the source to exist. It updates the odometry object’s preference, then the HAL resolves the active source from that preference and actual hardware availability. On wombat, preferring the calibration board while it is connected makes it the active pose source; otherwise internal odometry remains active.

Parameters:

source – Preferred odometry source enum.

Example:

from raccoon.hal import OdometrySource
from raccoon.step.motion import set_odometry_source

set_odometry_source(OdometrySource.CALIBRATION_BOARD)