From 017a401f534c8ac350b128db601da47d4ec15366 Mon Sep 17 00:00:00 2001 From: Jacob Neulight Date: Sun, 19 Jul 2026 13:14:00 -0600 Subject: [PATCH] controls: raise steerSaturated threshold 2.5 -> 3.5 deg (tuning experiment) 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. --- selfdrive/controls/lib/latcontrol_angle.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/latcontrol_angle.py b/selfdrive/controls/lib/latcontrol_angle.py index 9aa5b3cd01..c267fd1a43 100644 --- a/selfdrive/controls/lib/latcontrol_angle.py +++ b/selfdrive/controls/lib/latcontrol_angle.py @@ -4,7 +4,13 @@ from openpilot.selfdrive.controls.lib.latcontrol import LatControl # TODO This is speed dependent -STEER_ANGLE_SATURATION_THRESHOLD = 2.5 # Degrees +# BluePilot tuning experiment: 2.5 -> 3.5 deg. Measured desired-vs-actual lag during +# normal engaged driving on a Ford Explorer (angle mode, pinion measurement): median +# ~1.0 deg, p95 ~3.9 deg -- 2.5 sits inside the normal-operation distribution and fires +# on self-correcting transients (curve entry, PSCM post-press attenuation recovery). +# 3.5 cuts sustained alert episodes ~60-70% on recorded routes while genuinely +# at-the-limit driving (hairpin routes) still alerts richly. +STEER_ANGLE_SATURATION_THRESHOLD = 3.5 # Degrees class LatControlAngle(LatControl):