# Smooth pose faults
# @TODO @jira(CLM-10184) WheelSpeedStale and SteeringAngleStale triggering
# NoGos is an interim solution until the generic faults properly invalidate
# sensor streams
#
# Note that `triggers_nogo` sets NoGo on PCU and `reaction` sets NoGo on EMU
# See https://stackoverflow.com/c/zoox/questions/530

# Note when using the diagnostic_faults target, the fault name will be
# zoox::localization::smooth::SmoothPoseFaults
component: SmoothPose
source_enum: kEmuSmoothPose
namespace: zoox::localization
faults:
  - id: 0
    name: ImuStale
    severity: WARNING
    description: IMU is stale.
    troubleshooting_steps: Check for potential errors in the MofoGateway.
  - id: 1
    name: ImuOutOfRange
    severity: WARNING
    description: IMU data out of range.
  - id: 2
    name: WheelSpeedStale
    severity: ERROR
    description: Wheel speed is stale.
    triggers_nogo: true
    reaction:
        trajectory: NoGo
  - id: 3
    name: WheelSpeedOutOfRange
    severity: WARNING
    description: At least one wheel speed exceeded allowable bounds.
  - id: 4
    name: WheelSpeedDeltaOutOfRange
    severity: WARNING
    description: The difference between at least one pair of wheel speeds exceeded allowable bounds.
  - id: 5
    name: SmoothPoseUninitialized
    severity: ERROR
    description: Smooth pose not initialized. Stay stationary while biases are initialized.
    triggers_nogo: true
    reaction:
      trajectory: NoGo
  - id: 6
    name: AiInertialInfoStale
    severity: WARNING
    description: IPC Message is stale
    deprecated: true
  - id: 7
    name: DriveOutputStale
    severity: WARNING
    description: IPC Message is stale
    deprecated: true
  - id: 8
    name: UnknownIpcError
    severity: WARNING
    description: Unknown IPC Message error
  - id: 9
    name: ImuUdpDataReceiveError
    severity: WARNING
    description: IMU UDP data receiver returns error
  - id: 10
    name: ConductorBufferOverflow
    severity: ERROR
    description: The number of queued output smooth pose states exceeded buffer capacity.
    triggers_nogo: true
    reaction:
        trajectory: Estop
  - id: 11
    name: SteeringAngleStale
    severity: ERROR
    description: The steering angle message is stale.
    triggers_nogo: true
    reaction:
        trajectory: NoGo
  - id: 12
    name: SteeringAngleOutOfRange
    severity: WARNING
    description: One of the north or south steering angles exceeded allowable bounds.
  - id: 13
    name: BrakeStatusStale
    severity: INFO
    description: The brake status message is stale.
