From 9c5045febee93e0dd216745c6dfd65f1ec11cdfa Mon Sep 17 00:00:00 2001 From: rav4kumar Date: Wed, 19 Feb 2025 07:46:09 -0700 Subject: [PATCH] perhaphs --- selfdrive/controls/lib/longitudinal_planner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index da720207c2..971a4bc23b 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -162,14 +162,14 @@ class LongitudinalPlanner(LongitudinalPlannerSP): if self.accel_controller.is_enabled: min_limit, max_limit = self.accel_controller.get_accel_limits(v_ego, accel_clip) #TODO: If allow_throttle is causing issues, make sure it allows braking - if not self.allow_throttle: - min_limit = min(min_limit, -3.5) # Ensure braking is allowed if needed - print(f"allow_throttle={self.allow_throttle}, min_limit before={min_limit:.2f}") + #if not self.allow_throttle: + #min_limit = min(min_limit, -3.5) # Ensure braking is allowed if needed + #print(f"allow_throttle={self.allow_throttle}, min_limit before={min_limit:.2f}") print(f"Accel Controller: min_limit={min_limit:.2f}, max_limit={max_limit:.2f}") if self.mpc.mode == 'acc': # Use the accel controller limits directly - accel_clip = [min_limit, max_limit] + accel_clip = [ACCEL_MIN, max_limit] # Recalculate limit turn according to the new min, max steer_angle_without_offset = sm['carState'].steeringAngleDeg - sm['liveParameters'].angleOffsetDeg accel_clip = limit_accel_in_turns(v_ego, steer_angle_without_offset, accel_clip, self.CP)