joystick mode: add curvature control (#30010)

* Added curvature controls to joystick mode

* same line

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
pull/109/head
coffee-cake-isaac 2 years ago committed by GitHub
parent 2ebf0b186e
commit c43325fa17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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

Loading…
Cancel
Save