pull/28054/head
Shane Smiskol 3 years ago
parent 039987bb13
commit 84bf01fb7a
  1. 2
      selfdrive/car/toyota/interface.py
  2. 6
      selfdrive/car/toyota/toyotacan.py

@ -224,6 +224,8 @@ class CarInterface(CarInterfaceBase):
if ret.steerControlType == car.CarParams.SteerControlType.angle:
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_LTA
ret.steerActuatorDelay = 0.0 # + 0.2
ret.lateralTuning.init('pid')
ret.lateralTuning.pid.kiBP = [0.0]
ret.lateralTuning.pid.kpBP = [0.0]

@ -34,11 +34,13 @@ def create_lta_steer_command(packer, apply_steer, steer_req, limit_torque, op_pa
# ramps to 0 smoothly then back on falling edge of STEER_REQUEST if BIT isn't 1
# stock system sometimes uses this signal to wind down torque
# TODO: figure out why 99 is so much less torque than 100
"SETME_X64": 99 if limit_torque else 100,
# "SETME_X64": 99 if limit_torque else 100,
"SETME_X64": op_params.get("SETME_X64"),
# TODO: need to understand this better, it's always 1.5-2x higher than angle cmd
# TODO: revisit on 2023 RAV4
"ANGLE": op_params.get("ANGLE"),
# "ANGLE": op_params.get("ANGLE"),
"ANGLE": 0 if abs(apply_steer) < 10 else 10 if apply_steer > 0 else -10,
# seems to just be desired angle cmd
# TODO: does this have offset on cars where accurate steering angle signal has offset?

Loading…
Cancel
Save