Skip to content

Port Gyro Odometry to Awkernel #754

Open

Description

@ytakano

Implement gyro odometry in Awkernel using IMU angular velocity and vehicle velocity inputs to produce twist estimates with covariance for EKF localization, matching the behavior of the selected Autoware reference implementation.

Scope:

  • Accept timestamped IMU and vehicle velocity inputs with the required covariance information
  • Transform measurements into the configured output coordinate frame
  • Combine vehicle linear velocity and IMU angular velocity into twist estimates
  • Preserve the reference implementation’s covariance handling and stationary-state behavior
  • Define buffering, input freshness checks, and behavior when required inputs are unavailable or stale
  • Expose timestamped twist estimates with covariance for subsequent EKF integration

Acceptance criteria:

  • Output twist estimates and covariance match the reference within predefined tolerances under identical inputs and configuration.
  • Tests cover straight motion, turning, stationary conditions, and non-identity IMU mounting orientation.
  • Timestamp assignment, coordinate-frame conventions, and output-trigger behavior are documented and tested.
  • Missing or stale inputs are handled according to explicitly defined policies, with any deviations from the reference documented.
  • Execution time, scheduling delay, and memory usage are measured at representative input rates.
  • Test datasets, parameters, and reproduction steps are documented.

Out of scope:

Vehicle velocity estimation by integrating IMU acceleration, live IMU or CAN drivers, EKF fusion, and LiDAR motion distortion correction.

Activity

  1. ytakano commented on Oct 26, 2026

    @ytakano
    ContributorAuthor

    Current status:
    The core gyro odometry implementation was merged in #688. This issue tracks the remaining coordinate-transform handling, reference-compatible covariance processing, input management, and validation work.

    Remaining work:

    • Pin the Autoware reference version or commit and document its covariance handling, timestamp assignment, and output-trigger behavior.
    • Replace the identity-only transform lookup with support for configured IMU mounting orientation, and verify output-frame consistency.
    • Apply the pinned reference implementation’s angular velocity covariance handling in the actual output-generation path. Add end-to-end tests with anisotropic input covariance, including identity and non-identity IMU mounting orientations.
    • Enforce explicit input-buffer limits and define overflow behavior; preallocated capacity alone does not bound queue length.
    • Document and validate the existing missing-input and stale-input handling, and define and test out-of-order input behavior.
    • Add reference-comparison tests covering straight motion, turning, stationary conditions, different input rates, and non-identity IMU mounting orientations. Compare twist, covariance, timestamps, frame IDs, and whether an output is produced.
    • Measure execution time, scheduling delay, and memory usage at representative input rates.
    • Document test datasets, configurations, numerical tolerances, results, and reproduction steps.

    Covariance reference note:

    Autoware Core 1.8.0 uses the maximum of the three input angular variance values for all three diagonal entries and clears off-diagonal entries. This is not a general covariance rotation. Confirm the intended reference version before implementation and preserve its behavior unless a deviation is explicitly justified and documented.
    For example, with a single IMU sample whose angular velocity covariance is diag(1, 2, 3), this reference operation produces diag(3, 3, 3), even for an identity transform. Include this case in tests of the actual output-generation path, not only the covariance helper.

    Reference implementation:

    https://github.com/autowarefoundation/autoware_core/blob/1.8.0/localization/autoware_gyro_odometer/src/gyro_odometer_core.cpp#L32-L44

    Related work:

    Stationary-state correction and missing/stale-input handling already exist. Validate and complete these paths rather than treating them as entirely new functionality. Replay-based tests may supply recorded inputs without requiring live sensor drivers.

    Completion note:

    The merged core implementation is a starting point, not completion of this issue. Close this issue once the remaining work and the original acceptance criteria have been verified, with reproducible test and measurement results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions