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

component: Tracker
source_enum: kEmuTracker
namespace: zoox
faults:
  - id: 0
    name: controllerFailed
    severity: WARNING
    description: The tracker solver controller failed when calculating output commands.
    latching: false
    troubleshooting_steps: Collect logs and notify the RMC team.
  - id: 1
    name: attemptingToChangeDirectionOrGearWhileMoving
    severity: WARNING
    description: Attempted to change direction or gear while moving; coming to a stop.
    latching: false
    troubleshooting_steps: Wait for the vehicle to come to a stop. This fault
      should clear itself. If this faults persists, notify the RMC team.
  - id: 2
    name: stopFlagSet
    severity: INFO
    description: The Hero is coming to a stop due to an external command.
    latching: false
  - id: 3
    name: projectionFailed
    severity: WARNING
    description: Projection of the hero state onto the trajectory failed.
    latching: false
    troubleshooting_steps: If this is the only fault present and is persistent,
      notify the RMC team. Otherwise, handle other faults first--this is typically
      raised indirectly when, e.g., the trajectory is not available.
  - id: 4
    name: pastEndOfTrajectory
    severity: WARNING
    description: Hero ran past end of trajectory.
    latching: false
    troubleshooting_steps: Wait a few seconds to see if the fault clears itself.
      This should typically not occur, and if it does should only happen when near
      a stop. Notify the RMC team if this fault is persistent.
  - id: 5
    name: nearStopNoGo
    severity: INFO
    description: Near zero speed while executing NoGo trajectory.
    latching: false
  - id: 6
    name: changingDirectionWhileStopped
    severity: INFO
    description: We are currently stopped and changing drive direction.
    latching: false
    troubleshooting_steps: This fault should generally only be present for a few moments
      while the vehicle is flipping drive direction. If it does not clear itself, notify RMC.
  - id: 7
    name: tooFewTrajectoryPointsWhileStopped
    severity: WARNING
    description: We currently don't have enough trajectory points to track.
    latching: false
    troubleshooting_steps: This should only occur during initialization prior to
      receiving any trajectories. Otherwise, notify RMC.
  - id: 8
    name: heroStateStale
    severity: WARNING
    description: Hero state message is stale.
    latching: false
    troubleshooting_steps: The HeroSmoothStateInputStale fault should also be set.
      See it for troubleshooting steps.
  - id: 9
    name: trajectoryReferenceStale
    severity: WARNING
    description: Trajectory reference message is stale.
    latching: false
    troubleshooting_steps: The TrajectoryInputStale fault should also be set.
      See it for troubleshooting steps.
  - id: 10
    name: trajectoryUnavailable
    severity: WARNING
    description: No reference trajectory available for tracker.
    troubleshooting_steps: The input trajectory indicates that it is invalid.
      If this fault is persistent, investigate the health of the planner.
    latching: false
  - id: 11
    name: invalidPlannerSteeringMode
    severity: WARNING
    description: Invalid steering mode from the planner.
    troubleshooting_steps: This implies an invalid trajectory of some form. If this
      fault persists, contact RMC.
    latching: false
  - id: 12
    name: incompatibleTrackerDynamicConfigSteerModes
    severity: WARNING
    description: Incompatible tracker and steering limiter dynamic config steer modes.
    latching: false
    troubleshooting_steps: The steering limiter ODD isn't compatible with the
      current vehicle. Confirm that the ODD and planner steering mode are
      set correctly.
  - id: 13
    name: steerLimitsInvalid
    severity: WARNING
    description: Steer limit configuration is invalid for the current ODD.
    latching: false
    troubleshooting_steps: Confirm that the ODD is valid. Otherwise, notify RMC.
  - id: 14
    name: heroReversingButTrajectoryNot
    severity: WARNING
    description: The Hero is reversing but the trajectory is not requesting it.
    latching: false
    troubleshooting_steps: This fault should generally be intermittent.
      If persistent, notify RMC.
  - id: 15
    name: heroReversingNotSupportedPlanner
    severity: WARNING
    description: The Hero is reversing but we don't support doing so.
    latching: false
    troubleshooting_steps: This should not occur normally and implies a bad
      configuration. Notify RMC if needed.
  - id: 16
    # Note that this fault was 13 before the creation of the faults.yaml file,
    # but because it duplicated the incompatibleTrackerDynamicConfigSteerModes
    # fault, it was changed to be 18.
    name: invalidGearCommand
    severity: INFO
    description: Planner is sending a gear command that is not valid for the tracker.
    latching: false
    troubleshooting_steps: This should only occur during initialization prior to
      receiving any trajectories. Otherwise, notify RMC.
  - id: 17
    name: tooFewTrajectoryPoints
    severity: WARNING
    description: We currently don't have enough trajectory points.
    latching: false
    troubleshooting_steps: This should only occur during initialization prior to
      receiving any trajectories. Otherwise, notify RMC.
  - id: 18
    name: changingGearWhileStopped
    severity: INFO
    description: We are currently stopped and changing gear.
    latching: false
  - id: 19
    name: TrajectoryInputStale
    latching: false
    severity: WARNING
    description: CAS trajectory messages are missing. Likely caused by publisher is not running
      or IPC transportation has issue.
    troubleshooting_steps: |
      Inspect trajectory publisher, trajectory manager, is publishing the message on PCU main AI. Try `troubleshoot_signal_ros /ai_monitor/trajectory_manager/smoother`. If the message is not being published, restart planner from coredash.
  - id: 20
    name: HeroSmoothStateInputStale
    latching: false
    severity: WARNING
    description: Hero smooth state messages are missing. Likely caused by hero smooth state message
      publisher is not running or IPC transportation has issue.
    troubleshooting_steps: |
      Inspect hero smooth state publisher, smooth pose component, is publishing the message on PCU main AI. Try `troubleshoot_signal_ros /hero_smooth_state`. If the message is not being published, restart pose from coredash.
  - id: 21
    name: DriveFeedbackInputStale
    latching: false
    severity: WARNING
    description: Drive manager feedback messages are missing. Likely caused by drive manager is not running or IPC transportation has issue.
    troubleshooting_steps: Inspect drive feedback publisher, drive manager, is running on EMU-COM. Try `ps -A | grep drive_manager` from EMU-COM shell.
  - id: 22
    name: requestingParkButNotFullyStopped
    severity: WARNING
    description: Planner is requesting park gear but the Hero is not yet fully stopped.
    latching: false
    troubleshooting_steps: Wait to see if the fault clears itself. If persistent,
      notify RMC.
