controls: raise the angle-mode steerSaturated threshold 2.5 -> 3.5 deg#154
Closed
jrneulight wants to merge 1 commit into
Closed
controls: raise the angle-mode steerSaturated threshold 2.5 -> 3.5 deg#154jrneulight wants to merge 1 commit into
jrneulight wants to merge 1 commit into
Conversation
…iment) The "Turn Exceeds Steering Limit" advisory fires when desired-vs-actual steering exceeds STEER_ANGLE_SATURATION_THRESHOLD for ~1 s. Measured lag distributions on a Ford Explorer in angle mode (three drives, ~5 h): median ~1.0 deg, p90 ~2.9, p95 ~3.9 -- the 2.5 deg threshold sits inside normal operation's distribution and fires on self-correcting transients (curve entry lead, PSCM post-press attenuation recovery, blip recovery ramps). Sustained (>=1 s) alert episodes at candidate thresholds on recorded routes: normal roads: 2.5 -> 70 and 25 episodes; 3.5 -> 20 and 10; 4.5 -> 5 and 7 hairpin route (genuinely at the limit): 2.5 -> 131; 3.5 -> 88 3.5 deg (~p95 of benign lag, ~0.0012 1/m curvature error) cuts routine noise 60-70% while keeping rich coverage where the car truly cannot make the turn, and still catches a genuine failure within ~2.5-3 s at 30 mph. Experiment branch only -- to be validated on-road before any PR. Note the constant is also consumed by controlsd's steer_limited_by_safety (command-vs-applied, inert for Ford's actuator layout); a brand-scoped override may be preferred upstream.
Contributor
Author
|
Withdrawn: keeping the stock 2.5 deg threshold. The opt-in hands-on alert context in #155 is the preferred remedy for the alert storms — it targets the actual cause (sub-threshold resisting hands) instead of moving the global latch point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The evidence that motivated this
00000010--93********logged 12 honest episodes at 29–35 mph in one drive; route00000001--be********~70; route00000027--97********13 in 26 minutes.steeringPressedthreshold). The alert was mostly telling an engaged, hands-on driver what their own hands were doing.STEER_ANGLE_SATURATION_THRESHOLD= 2.5°) predates the angle-mode work; Ford angle mode routinely carries > 2.5° of transient desired-vs-actual error at curve entries that resolve within the same curve.Why the fix is shaped this way
Counting sustained episodes in the logs at both thresholds: 3.5° cuts them 25 → 10 on route
00000010--93********and ~70 → ~20 on route00000001--be********, while every deep sustained saturation (> 1 s) carries > 3.5° error and still latches. The alert's other conditions (undershoot ratio > 1.2, |desired lat accel| > 1.0 m/s², selfdrived's 2 s recent-press window) are untouched.The evidence afterwards
Two follow-up drives ran with 3.5°: on the windy route
00000027--97********the remaining 13 alerts were all deep sustained undershoots (verified against delivery telemetry — no false storm), and route0000002a--ce********produced zero alerts with zero missed sustained saturations.What each change is
selfdrive/controls/lib/latcontrol_angle.py:STEER_ANGLE_SATURATION_THRESHOLD2.5 → 3.5°, with a comment recording the angle-mode rationale.Test it yourself
Replay any angle-mode route and count
steerSaturatedinonroadEventsbefore/after. Episodes that persist > 1 s are unchanged; the short entry-transient latches are what disappear.Risks / limits
During a genuinely deepening saturation the alert latches slightly later (error must pass 3.5° instead of 2.5°). The undershoot-ratio and lateral-accel conditions still bound when it can fire at all, and the alert is advisory — no control behavior changes.