From c4a23447da8e49960c16b22af16419a1fcf8f69a Mon Sep 17 00:00:00 2001 From: infiniteCable <75014343+infiniteCable@users.noreply.github.com> Date: Thu, 10 Apr 2025 23:00:58 +0200 Subject: [PATCH] Update disturbance_controller.py --- selfdrive/controls/lib/disturbance_controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/disturbance_controller.py b/selfdrive/controls/lib/disturbance_controller.py index 976bd7b83..da785fc72 100644 --- a/selfdrive/controls/lib/disturbance_controller.py +++ b/selfdrive/controls/lib/disturbance_controller.py @@ -50,9 +50,10 @@ class DisturbanceController: return desired_curvature steering_angle_without_offset = math.radians(CS.steeringAngleDeg - params.angleOffsetDeg) - actual_curvature_vm = -VM.calc_curvature(steering_angle_without_offset, CS.vEgo, 0.) + actual_curvature_vm = -VM.calc_curvature(steering_angle_without_offset, CS.vEgo, params.roll) actual_curvature_3dof = -VM.calc_curvature_3dof(calibrated_pose.acceleration.y, calibrated_pose.acceleration.x, - calibrated_pose.angular_velocity.yaw, CS.vEgo, steering_angle_without_offset, 0.) + calibrated_pose.angular_velocity.yaw, CS.vEgo, steering_angle_without_offset, + params.roll) actual_curvature = np.interp(CS.vEgo, [2.0, 5.0], [actual_curvature_vm, actual_curvature_3dof]) alpha = self.compute_dynamic_alpha(desired_curvature)