component: Perception
proto_imports:
  - vehicle/perception/diagnostics/perception_diagnostics.proto
metric: zoox::perception::diagnostics::PerceptionMetric
namespace: zoox::perception
# When adding a new fault consider updating perception_predicate iff the
# newly added fault should have a higher priority than dictated by this
# file.
faults:
  # *** 00XX: General system faults ***
  - id: 1
    name: ObstacleDetectorSegmentationFailed
    severity: ERROR
    description: Segmentation of the spin failed.
    triggers_nogo: true
  - id: 2
    name: ObstacleDetectorUpdateFailed
    severity: ERROR
    description: The entire ObstacleDetector update failed (unspecified failure).
    triggers_nogo: true
  - id: 3
    name: BaseLinkToSmoothTransformLookupFailed
    severity: ERROR
    description: Could not look up a required coordinate transform.
    triggers_nogo: true
  - id: 4
    name: ObstacleDetectorNotInitialized
    severity: ERROR
    description: ObstacleDetector has not started yet.
    triggers_nogo: true
  - id: 5
    name: SmoothTranslationValidationError
    severity: ERROR
    description: Virtual velodyne to smooth translation has very large values. Please restart pose node.
    triggers_nogo: true
  - id: 6
    name: SensorFailureCritical
    severity: ERROR
    description: Perception has not received any recent messages from critical sensor(s).
    triggers_nogo: true
  - id: 7
    name: SensorDiagnosticsDisabled
    severity: WARNING
    description: Perception sensor diagnostics are currently disabled. Stale sensors will not be reported.
  - id: 8
    name: UTMPoseNotReceived
    severity: ERROR
    description: ObstacleDetector has not received UTM pose information. It is likely the localizer is not running yet.
    triggers_nogo: true
  - id: 9
    name: ObstacleDetectorLidarUpdateFailed
    severity: ERROR
    description: The ObstacleDetector lidar update failed (unspecified failure).
    triggers_nogo: true
  - id: 10
    name: VisionDiagnosticsDisabled
    severity: WARNING
    description: Perception vision diagnostics are currently disabled. Stale vision sensors will not be reported.
  # *** 01XX: Radar faults  ***
  - id: 100
    name: RadarStale
    severity: ERROR
    description: Perception has not received any messages from radar sensor(s) for 500 ms.
    freeze_frame: zoox.perception.diagnostics.SensorDataStaleFreezeFrame
    triggers_nogo: true
  - id: 101
    name: RadarFrequencyLow
    severity: WARNING
    description: Perception has not received radar msgs at radar output frequency.
    freeze_frame: zoox.perception.diagnostics.RadarFrequencyLowFreezeFrame
  - id: 102
    name: RadarAzimuthMisaligned
    severity: WARNING
    description: Perception detects radar sensor azimuthal misalignment.
    freeze_frame: zoox.perception.diagnostics.RadarAzimuthMisalignedFreezeFrame
  # *** 02XX: Lidar faults ***
  - id: 200
    name: LidarStale
    severity: ERROR
    description: Perception has not received any messages from lidar sensor(s) for 500 ms.
    freeze_frame: zoox.perception.diagnostics.SensorDataStaleFreezeFrame
    triggers_nogo: true
  - id: 201
    name: LidarSemanticSegmentationFailed
    severity: ERROR
    description: Lidar perception has no semantic information.
    triggers_nogo: true
  - id: 202
    name: LidarCalibrationGood
    severity: INFO
    description: Lidar calibration is GOOD.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
  - id: 203
    name: LidarCalibrationAverage
    severity: WARNING
    description: Lidar calibration is AVERAGE. The vehicle can remain operational, but contact Dispatch to schedule re-calibration for this vehicle.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
  - id: 204
    name: LidarCalibrationBad
    severity: ERROR
    description: Lidar calibration is BAD. Abort the current mission and contact Dispatch to take the vehicle out of service and re-calibrate immediately.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
    triggers_nogo: true
  - id: 205
    name: LidarCalibrationCheckerFailed
    severity: ERROR
    description: Running online lidar calibration checker failed.
    triggers_nogo: true
  - id: 206
    name: LidarMetaspinStale
    severity: ERROR
    description: No lidar metaspin received over a critical period of time.
    triggers_nogo: true
  - id: 207
    name: LidarPhaseLockGood
    severity: INFO
    description: Online lidar diagnostic shows lidar phase lock is at a GOOD level.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
  - id: 208
    name: LidarPhaseLockAverage
    severity: WARNING
    description: Online lidar diagnostic shows lidar phase lock at an AVERAGE level.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
  - id: 209
    name: LidarPhaseLockBad
    severity: ERROR
    description: Online lidar diagnostic shows lidar phase lock is at a BAD level.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
    triggers_nogo: true
  - id: 210
    name: LidarBeamCheckerGood
    severity: INFO
    description: Online lidar diagnostic shows lidar beams is at a GOOD level.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
  - id: 211
    name: LidarBeamCheckerAverage
    severity: WARNING
    description: Online lidar diagnostic shows lidar beams at an AVERAGE level.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
  - id: 212
    name: LidarBeamCheckerBad
    severity: ERROR
    description: Online lidar diagnostic shows lidar beams is at a BAD level.
    freeze_frame: zoox.perception.diagnostics.LidarCalibrationCheckerFreezeFrame
    triggers_nogo: true
  - id: 213
    name: HeroStateDropInSpinLoader
    severity: WARNING
    description: The spin loader detected an issue with one or more hero state messages in a tick and ignored them.
    freeze_frame: zoox.perception.diagnostics.SpinLoaderHeroStateDropFreezeFrame
  - id: 214
    name: MetaspinDropInSpinLoader
    severity: WARNING
    description: The spin loader dropped one or more metaspins in a tick.
    freeze_frame: zoox.perception.diagnostics.MetaspinDropFreezeFrame
  # *** 03XX Vision faults ***
  - id: 300
    name: VisionStale
    severity: ERROR
    description: Perception has not received any messages from vision computer(s) for 300 ms.
    freeze_frame: zoox.perception.diagnostics.SensorDataStaleFreezeFrame
    triggers_nogo: true
  - id: 301
    name: LidarVisionPhaselockMisaligned
    severity: WARNING
    description: Lidar-vision phase lock is misaligned.
    freeze_frame: zoox.perception.diagnostics.LidarVisionPhaselockFreezeFrame
  # *** 04XX Background subtractor faults. ***
  - id: 400
    name: BackgroundSubtractorDataMissing
    severity: WARNING
    description: The background subtractor does not have sufficent data against which to do background subtraction.
  # *** 05XX Road filter faults. ***
  - id: 500
    name: RoadFilterDataMissing
    severity: ERROR
    description: The road filter does not have sufficient data against which to estimate the distance of points to the nearest road surface point.
    triggers_nogo: true
  # *** 06XX Output validator faults. ***
  - id: 600
    name: PO2ValidationError
    severity: WARNING
    description: Output PerceptionObstacles2 message failed validation.
    freeze_frame: zoox.perception.diagnostics.PO2ValidationFreezeFrame
  - id: 700
    name: LidarScanDropped
    severity: WARNING
    description: A lidar scan was dropped. Please notify the 3D perception team.
  - id: 800
    name: MetaspinStampWasNonIncreasing
    severity: WARNING
    description: A successive metaspin stamp was non-increasing. Please notify the 3D Perception team.
    # Deprecated.
  - id: 900
    name: UtmAltitudeLookupAllMissed
    severity: ERROR
    description: All UTM lookups into altitude map missed on current frame, map is unavailable for this area.
    freeze_frame: zoox.perception.diagnostics.UtmAltitudeLookupFreezeFrame
    triggers_nogo: true
    deprecated: true
  - id: 1000
    name: OnRoadCacheInvalid
    severity: WARNING
    description: OnRoadCache for the current ZRN was not loaded properly. If you are on experimental ZRN, ignore this warning. Otherwise contact @chris.gibson or @JoCo.
    deprecated: true
  - id: 1100
    name: AlignerDriftLarge
    severity: ERROR
    description: Check of the LL3D aligner pose against the smooth pose failed.
    freeze_frame: zoox.perception.diagnostics.AlignerDriftFreezeFrame
    triggers_nogo: true
  - id: 1200
    name: IncompleteMetaspin
    severity: ERROR
    description: One or more lidar sensors failed to publish messages frequently enough.
    freeze_frame: zoox.perception.diagnostics.IncompleteMetaspinFreezeFrame
    triggers_nogo: true
