{
  "name": "navsim planner",
  "version": "1",
  "source": "Hazards are what NAVSIM's EPDMS scores (https://github.com/autonomousvision/navsim/blob/main/docs/metrics.md): its four multiplicative gates - no at-fault collision, drivable-area compliance, driving-direction compliance, traffic-light compliance - and the subscores ego progress, time to collision, lane keeping and history comfort. Two more are declared from nuPlan's closed-loop metric, which NAVSIM's EPDMS is derived from and which gates on both: speed-limit compliance and stopping at stop signs. NAVSIM scores neither, so no check here can evidence them; they are declared so a report says so, rather than being left out of the boundary. The faults are mutational's planner operators, in NAVSIM's units: metres, seconds, and the one call a NAVSIM agent gets.",
  "notes": "A NAVSIM agent is called once per scene, so no operator has a window. `reaches` says what each fault is aimed at, and is a claim; which check a scene actually fails through is what a sweep measures. `low_progress` is a threshold this adapter chose (EP below 0.5) and is stated in checks.py. Two-frame extended comfort is not a check: it needs the scene 0.5 s earlier.",
  "hazards": [
    {"id": "collision", "name": "An at-fault collision with another road user or object", "gate": "fail"},
    {"id": "off_drivable_area", "name": "Left the drivable area", "gate": "fail"},
    {"id": "wrong_way", "name": "Drove against the direction of traffic", "gate": "fail"},
    {"id": "red_light", "name": "Entered an intersection against a red light", "gate": "fail"},
    {"id": "stalled", "name": "Made less than half the progress the scene allowed", "gate": "fail"},
    {"id": "unsafe_headway", "name": "Time to collision fell below NAVSIM's bound", "gate": "fail"},
    {"id": "lane_departure", "name": "Left the lane for longer than NAVSIM allows", "gate": "fail"},
    {"id": "discomfort", "name": "Accelerations or jerk beyond NAVSIM's comfort bounds", "gate": "fail"},
    {"id": "speed_limit", "name": "Exceeded the speed limit (a nuPlan metric NAVSIM does not score)", "gate": "fail"},
    {"id": "stop_sign", "name": "Did not stop at a stop sign (a nuPlan metric NAVSIM does not score)", "gate": "fail"}
  ],
  "operators": [
    {"name": "blind", "kind": "blind", "magnitudes": [0.25, 0.5, 0.75],
     "reaches": ["collision", "unsafe_headway"],
     "rationale": "Objects beyond 100 m * (1 - m) are not in the planner's input: 75, 50 and 25 m."},
    {"name": "lag", "kind": "lag", "magnitudes": [0.33, 0.67, 1.0],
     "reaches": ["collision", "unsafe_headway", "lane_departure", "off_drivable_area", "red_light"],
     "rationale": "The planner is given the frame 0.5, 1.0 or 1.5 s ago and its plan is executed from where the car is now."},
    {"name": "myopic", "kind": "myopic", "magnitudes": [0.25, 0.5, 0.75],
     "reaches": ["collision", "unsafe_headway"],
     "rationale": "PDM-Closed forecasts and scores its proposals over 3, 2 or 1 s instead of 4."},
    {"name": "unsteady", "kind": "unsteady", "magnitudes": [0.25, 0.5, 1.0],
     "reaches": ["lane_departure", "off_drivable_area", "discomfort", "collision"],
     "rationale": "Gaussian noise of 0.125, 0.25 or 0.5 m on each output pose, from the seed."},
    {"name": "coarse", "kind": "coarse", "magnitudes": [0.5, 1.0],
     "reaches": ["lane_departure", "off_drivable_area", "discomfort"],
     "rationale": "Output poses rounded to a 1 or 2 m grid."},
    {"name": "depth-error", "kind": "depth-error", "magnitudes": [0.5, 1.0],
     "reaches": ["collision", "unsafe_headway"],
     "rationale": "Every perceived object 5 or 10 m farther along the ray than it is."},
    {"name": "drift", "kind": "drift", "magnitudes": [0.25, 0.5, 1.0],
     "reaches": ["lane_departure", "off_drivable_area", "wrong_way"],
     "rationale": "The planner believes the car is 0.5, 1 or 2 m to its left."},
    {"name": "yaw-error", "kind": "yaw-error", "magnitudes": [0.25, 0.5, 1.0],
     "reaches": ["lane_departure", "off_drivable_area", "wrong_way"],
     "rationale": "The planner believes the car's heading is 3.75, 7.5 or 15 degrees off."},
    {"name": "dropout", "kind": "dropout", "magnitudes": [0.5, 1.0],
     "reaches": ["red_light"],
     "rationale": "Each traffic-light status is dropped with probability 0.5, or all of them."},
    {"name": "phantom-actor", "kind": "phantom-actor", "magnitudes": [0.5, 1.0],
     "reaches": ["stalled", "discomfort"],
     "rationale": "A stationary car that is not there, 27.5 or 5 m ahead on the ego's heading."}
  ],
  "checks": {
    "at_fault_collision": ["collision"],
    "off_drivable_area": ["off_drivable_area"],
    "wrong_way": ["wrong_way"],
    "ran_red_light": ["red_light"],
    "low_progress": ["stalled"],
    "ttc_violation": ["unsafe_headway"],
    "lane_departure": ["lane_departure"],
    "uncomfortable": ["discomfort"]
  }
}
