From b874463fdc5e3355b5164475a69665cbb0d95149 Mon Sep 17 00:00:00 2001 From: infiniteCable <75014343+infiniteCable@users.noreply.github.com> Date: Sun, 6 Jul 2025 14:26:25 +0200 Subject: [PATCH] Update controlsd.py --- selfdrive/controls/controlsd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 2788de656..f4da80865 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -55,6 +55,7 @@ class Controls(ControlsExt): self.steer_limited_by_controls = False self.curvature = 0.0 + self.curvature_no_roll = 0.0 self.desired_curvature = 0.0 self.roll = 0.0 @@ -106,6 +107,7 @@ class Controls(ControlsExt): steer_angle_without_offset = math.radians(CS.steeringAngleDeg - lp.angleOffsetDeg) self.curvature = -self.VM.calc_curvature(steer_angle_without_offset, CS.vEgo, lp.roll) + self.curvature_no_roll = -self.VM.calc_curvature(steer_angle_without_offset, CS.vEgo, 0.0) self.roll = lp.roll # Update Torque Params @@ -182,6 +184,7 @@ class Controls(ControlsExt): CS = self.sm['carState'] CC.curvatureControllerActive = self.enable_curvature_controller # for car controller curvature correction activation + CC.currentCurvatureNoRoll = self.curvature_no_roll CC.rollDEPRECATED = self.roll # for lateral iso limit calculation # Orientation and angle rates can be useful for carcontroller