From 997c1be7b678e1dc9569b5a70442cde6271ea4e4 Mon Sep 17 00:00:00 2001 From: whoisdomi Date: Mon, 4 May 2026 10:28:29 -0500 Subject: [PATCH] Could this be the last accel chain? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: limit_accel_in_turns breakpoint table started at 20 m/s, causing np.interp to clamp a_total_max to 1.7 m/s² for all speeds below 20 m/s (~45 mph), overriding acceleration profiles during the entire low-speed pull. Fix: Extended _A_TOTAL_MAX_BP down to 0 m/s with a 3.5 m/s² ceiling, matching the maximum ACCEL_MAX. Turn protection still works correctly since a_y grows with v² and naturally consumes the budget in actual turns. --- selfdrive/controls/lib/longitudinal_planner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index 4718df678..48949def0 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -99,8 +99,8 @@ UNCERT_SLOPE_TRIG = 0.12 # per second UNCERT_MAG_TRIG = 0.50 # Lookup table for turns -_A_TOTAL_MAX_V = [1.7, 3.2] -_A_TOTAL_MAX_BP = [20., 40.] +_A_TOTAL_MAX_V = [3.5, 3.5, 3.2] +_A_TOTAL_MAX_BP = [0., 20., 40.] def get_longitudinal_personality(sm):