try cutting steer every second

pull/24618/head
Shane Smiskol 3 years ago
parent ca1582b5d7
commit 6923498b2a
  1. 5
      selfdrive/car/toyota/toyotacan.py

@ -17,13 +17,14 @@ def create_lta_steer_command(packer, apply_steer, steer_angle, driver_torque, st
percentage = interp(abs(driver_torque), [50, 100], [100, 0])
apply_steer = interp(percentage, [-10, 100], [steer_angle, apply_steer])
steer_req = steer_req == 1 and (raw_cnt % 100 != 0)
values = {
"COUNTER": raw_cnt, # 0 to 62
"SETME_X1": 1,
"SETME_X3": 1, # usually 1, but sometimes 3 (??)
"PERCENTAGE": percentage, # correlated with driver torque
"PERCENTAGE": 100, # correlated with driver torque
"SETME_X64": 0x64, # ramps to 0 smoothly then back on falling edge of STEER_REQUEST if BIT isn't 1
"ANGLE": apply_steer * 1.5, # TODO: need to understand this better, it's always 1.5-2x higher than angle cmd
"ANGLE": 0, # TODO: need to understand this better, it's always 1.5-2x higher than angle cmd
"STEER_ANGLE_CMD": apply_steer, # seems to just be desired angle cmd
"STEER_REQUEST": steer_req, # stock system turns off steering after ~20 frames of override, else torque winds up
"STEER_REQUEST_2": steer_req, # duplicate

Loading…
Cancel
Save