Skip to content

IMU robustness #11

Description

@jkaflik

Context

Current firmware initializes the LSM6DSO once and sets an LED failure flag if initialization fails. Upstream OpenMower LowLevel includes additional initialization checks and retry/failure behavior.

Current Local Behavior

  • Supports LSM6DSO on HW 0.13.x.
  • Publishes raw accel/gyro as sensor_msgs/Imu at 50 Hz.
  • Sets orientation_covariance[0] = -1 because orientation is unavailable.
  • Does not retry initialization.

Upstream Reference Behavior

OpenMower LowLevel:

  • Supports several IMU variants across board revisions.
  • For LSM6DSO, reads WHOAMI and expects 0b01101100.
  • Retries initialization multiple times before declaring failure.
  • Uses fatal blink/sound behavior when IMU initialization fails.
  • Provides an imu_loop() hook for serial/fused IMU variants.

Acceptance Criteria

  • Add LSM6DSO WHOAMI validation during init.
  • Retry IMU initialization with a bounded retry count and visible status feedback.
  • Decide whether IMU init failure should be non-fatal, fatal, or configurable for this ROS 2 firmware.
  • Verify accel and gyro axis mapping/signs against upstream OpenMower and ROS frame conventions.
  • Document IMU frame id and orientation convention.
  • Keep publishing orientation_covariance[0] = -1 while orientation is unavailable.
  • Add runtime read failure handling instead of silently skipping forever.

Notes

Comparison found a potential gyro sign difference versus upstream OpenMower LSM6DSO mapping. That should be verified on hardware before changing behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions