# EMU Robot Monitor fault definitions
# Highly Confidential and Proprietary Zoox Information. Copyright (c) Zoox.

component: RobotMonitor
source_enum: kEmuRobotMonitor
namespace: zoox
faults:
  - id: 0
    name: DriveManagerStale
    severity: ERROR
    description: Drive Manager IPC message has not been received within threshold.
    threshold_ms: 20
    signal: common::proto::DriveFeedback.
    set_condition: Drive Manager IPC message goes stale.
    clear_condition: Investigate delays between Drive Manager and Robot Monitor IPC messages.
#   @todo JIRA FW-7816 Enable Drive Manager IPC Stale Fault Reaction
#    reaction:
#      trajectory: NoGo
#      allowed_missions: None
  - id: 1
    name: BmsWarningRestrictOdd
    severity: WARNING
    description: BMS is reporting a warning so restrict ODD to BaseOps.
    troubleshooting_steps: Check BMS.
    signal: common::proto::BmsStatus
    set_condition: Battery Management System issues a warning.
    clear_condition: Charge the batteries.
  - id: 2
    name: SteeringCalRequiredRestrictOdd
    severity: WARNING
    description: Steering Calibration is need so restrict ODD to BaseOps.
    troubleshooting_steps: Execute a steering calibration.
    signal: steering_cal_recommended from Drive Manager feedback message.
    set_condition: EPAS steering calibration is recommended.
    clear_condition: Perform a fresh EPAS steering calibration.
  - id: 3
    name: RemoteDriveStateRestrictOdd
    severity: WARNING
    description: In Remote Control drive state so restricting ODD to BaseOps.
    troubleshooting_steps:
    signal: common::proto::DriveState::Type::kRemoteControl.
    set_condition: Drive State is in Remote Control mode.
    clear_condition: Change Drive State.
  - id: 4
    name: SsdAlmostFull
    severity: WARNING
    description: EMU's ssd is 85% full.
    troubleshooting_steps: Scrape all logs on emu.
    set_condition: Failed to read SSD or SSD is almost full (>= 85%).
    clear_condition: Reseat SSD and free up some space.
  - id: 5
    name: UnbuckledPassengerRestrictOdd
    deprecated: true
    severity: WARNING
    description: ACU+OCS reports unbuckled passenger so restrict ODD to BaseOps.
    troubleshooting_steps: Ensure all passengers are buckled.
    signal: common::proto::BodyFeedback.
    set_condition: Occupied seat and Unbuckled passenger.
    clear_condition: Buckle seatbelt for all passengers.
  - id: 6
    name: BodyFeedbackIncompleteRestrictOdd
    deprecated: true
    severity: WARNING
    description: body_feedback_ message incomplete so restrict ODD to BaseOps.
    troubleshooting_steps: Investigate cause of lost body_feedback_ state info.
    signal: common::proto::BodyFeedback.
    set_condition: Problems in seat/buckle sensors; Problem in body_feedback_ message.
