Skip to content

Commit

Permalink
Toyota Camry TSS2: update torque control params (commaai#24819)
Browse files Browse the repository at this point in the history
Use updated accel and friction values for TSS2 Camry
  • Loading branch information
sshane authored and Casey Francis committed Jun 23, 2022
1 parent 83db938 commit 7503288
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
ret.stoppingControl = False # Toyota starts braking more when it thinks you want to stop

stop_and_go = False
torque_params = CarInterfaceBase.get_torque_params(candidate)

if candidate == CAR.PRIUS:
stop_and_go = True
Expand Down Expand Up @@ -99,7 +100,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
tire_stiffness_factor = 0.7933
ret.mass = 3400. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid
if Params().get_bool('Torque'):
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_LAT_ACCEL=2.4, FRICTION=0.05)
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, torque_params['LAT_ACCEL_FACTOR'], torque_params['FRICTION'])
else:
set_lat_tune(ret.lateralTuning, LatTunes.PID_C)

Expand Down

0 comments on commit 7503288

Please sign in to comment.