From cf35d8eded1f0cd5cb80acf09ab94853417f2a38 Mon Sep 17 00:00:00 2001 From: coffee-cake-isaac <48419673+coffee-cake-isaac@users.noreply.github.com> Date: Sat, 23 Sep 2023 00:53:31 -0400 Subject: [PATCH] joystick mode: add curvature control (#30010) * Added curvature controls to joystick mode * same line --------- Co-authored-by: Shane Smiskol old-commit-hash: c43325fa17c270f9b5eef6c01edaf82cb360df29 --- selfdrive/controls/controlsd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 1dc9dd39f..770c39d3f 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -629,8 +629,8 @@ class Controls: if CC.latActive: steer = clip(self.sm['testJoystick'].axes[1], -1, 1) - # max angle is 45 for angle-based cars - actuators.steer, actuators.steeringAngleDeg = steer, steer * 45. + # max angle is 45 for angle-based cars, max curvature is 0.02 + actuators.steer, actuators.steeringAngleDeg, actuators.curvature = steer, steer * 45., steer * -0.02 lac_log.active = self.active lac_log.steeringAngleDeg = CS.steeringAngleDeg