set curvature in joystickd (#34668)

* set curvature in joystickd

* Update joystickd.py

* Update joystickd.py
pull/34667/head
Shane Smiskol 2 months ago committed by GitHub
parent a8e416abbe
commit e9aa331f0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      tools/joystick/joystickd.py

@ -62,6 +62,11 @@ def joystickd_thread():
cs_msg.valid = True
controlsState = cs_msg.controlsState
controlsState.lateralControlState.init('debugState')
lp = sm['liveParameters']
steer_angle_without_offset = math.radians(sm['carState'].steeringAngleDeg - lp.angleOffsetDeg)
controlsState.curvature = -VM.calc_curvature(steer_angle_without_offset, sm['carState'].vEgo, lp.roll)
pm.send('controlsState', cs_msg)
rk.keep_time()

Loading…
Cancel
Save