Skip to content

Conversation

@andiradulescu
Copy link
Contributor

Summary
Driver monitoring intended behavior is that when you are stopped = visual only, no audible.
This handles the edge case where someone was already at orange while driving and then stopped.

Description

When awareness is at orange level and vehicle is stopped, emit preDriverDistracted (green/visual-only) instead of promptDriverDistracted (orange/audible).

This aligns with comma's philosophy that driver monitoring shouldn't actively enforce when not moving (per George Hotz in https://youtu.be/-qf1NzI1I7E?t=52). The existing standstill_orange_exemption pauses countdown at the orange boundary, but if a driver was already at orange while driving and then stopped, they'd still hear the audible alert. This change downgrades it to visual-only at standstill.

Behavior:

  • Countdown: unchanged (pauses at orange boundary when stopped)
  • Green alert: unchanged (visual-only)
  • Orange alert at standstill: downgraded to green (visual-only)
  • Red alert: unchanged (safety - driver may be asleep)

Verification

In selfdrive/monitoring/test_monitoring.py:

existing test_long_traffic_light_victim partially covers this:

  • preDriverDistracted (green) while at standstill (59.9s)
  • promptDriverDistracted (orange) after the car starts moving (60.5s)

new test_distracted_then_stops:

  • 0-6s: Car moving, distracted → awareness decreases, eventually reaches orange
    threshold
  • 6s: promptDriverDistracted (orange) because moving + in orange zone
  • 7s: Car stops (standstill=True)
  • 7s+: Should downgrade to preDriverDistracted (green) because now at standstill

@andiradulescu andiradulescu marked this pull request as ready for review February 3, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant