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)