feathersdk.robot.services.wheel_odometry_service Module¶
Dead-reckoning odometry for a three-wheel swerve base from motor mech_pos feedback.
- class feathersdk.robot.services.wheel_odometry_service.WheelOdometryServiceConfig(*, odometry_source='wheel', module_name='wheel_odometry_service', operating_frequency=30.0, wheel_size_mult=1.0)¶
Bases:
PyDFrozenBaseModelConfiguration for wheel-encoder odometry.
- Parameters:
- odometry_source: Literal['wheel']¶
Selects this config as wheel-encoder odometry on FeatherRobotConfig.odometry_service_config.
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.services.wheel_odometry_service.WheelOdometryService(config, *args, **kwargs)¶
Bases:
RobotModule[WheelOdometryServiceConfig]Integrates turning/drive mech_pos into a rigid-body base pose via least squares.
Each module’s drive Δmech_pos is projected along its steering angle into a body-frame displacement. The three modules overdetermine (δx, δy, δψ), so wheels may roll at different rates without a separate code path.
Requires robot.navigation_system. Geometry comes from NavigationSystemConfig.wheel_radius / wheel_positions once navigation has initialized, or from the URDF if those are unset.
- Parameters:
config (WheelOdometryServiceConfig)
robot (FeatherRobot)
- get_pose()¶
Return the current dead-reckoned pose (x, y, yaw) in meters / radians.
- Return type:
- seed()¶
Record current drive mech_pos as the integration baseline (no pose change).
- Return type:
None
- reset(pose=(0.0, 0.0, 0.0))¶
Reset the pose and re-seed drive encoder baselines.
- Parameters:
pose (OdometryPose) – Pose to set as the new origin. Defaults to (0, 0, 0).
- Return type:
None
- update()¶
Integrate one step from the latest turning/drive mech_pos readings.
Skips the step if navigation is not initialized or any module is missing telemetry.
- Return type:
None