From f16af324598f4e0607170d23e9289a28aea7184f Mon Sep 17 00:00:00 2001 From: infiniteCable <75014343+infiniteCable@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:21:36 +0200 Subject: [PATCH] Update controlsd.py --- selfdrive/controls/controlsd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index c143edef8..7eb54ff27 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -139,8 +139,7 @@ class Controls: # Reset desired curvature to current to avoid violating the limits on engage new_desired_curvature = model_v2.action.desiredCurvature if CC.latActive else self.curvature if self.enable_disturbance_correction: - disturbance_correction = self.disturbance_controller.get_correction(CS, self.VM, lp, self.calibrated_pose, new_desired_curvature) - new_desired_curvature += disturbance_correction + new_desired_curvature = self.disturbance_controller.get_correction(CS, self.VM, lp, self.calibrated_pose, new_desired_curvature) self.desired_curvature, curvature_limited = clip_curvature(CS.vEgo, self.desired_curvature, new_desired_curvature, lp.roll) actuators.curvature = self.desired_curvature