Skip to content

Commit 0c32b71

Browse files
committed
Revert "update tune, rate limits not permanent"
This reverts commit 806ffdf.
1 parent 5224783 commit 0c32b71

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

selfdrive/car/toyota/interface.py

+13-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
2525

2626
ret.stoppingControl = False # Toyota starts braking more when it thinks you want to stop
2727

28-
if candidate not in [CAR.PRIUS, CAR.RAV4, CAR.RAV4H]: # These cars use LQR/INDI
28+
if candidate not in [CAR.PRIUS, CAR.RAV4, CAR.RAV4H, CAR.CAMRYH_TSS2]: # These cars use LQR/INDI
2929
ret.lateralTuning.init('pid')
3030
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]]
3131

@@ -134,8 +134,18 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
134134
ret.steerRatio = 13.7
135135
tire_stiffness_factor = 0.7933
136136
ret.mass = 3400. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid
137-
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.4], [0.1]]
138-
ret.lateralTuning.pid.kf = 0.00006
137+
ret.lateralTuning.init('indi')
138+
ret.lateralTuning.indi.innerLoopGainBP = [20, 24, 30]
139+
ret.lateralTuning.indi.innerLoopGainV = [7.25, 7.5, 9]
140+
ret.lateralTuning.indi.outerLoopGainBP = [20, 24, 30]
141+
ret.lateralTuning.indi.outerLoopGainV = [6, 7.25, 6]
142+
ret.lateralTuning.indi.timeConstantBP = [20, 24]
143+
ret.lateralTuning.indi.timeConstantV = [2.0, 2.2]
144+
ret.lateralTuning.indi.actuatorEffectivenessBP = [20, 24]
145+
ret.lateralTuning.indi.actuatorEffectivenessV = [2, 3]
146+
ret.steerActuatorDelay = 0.3
147+
ret.steerRateCost = 1.25
148+
ret.steerLimitTimer = 0.5
139149

140150
elif candidate in [CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2]:
141151
stop_and_go = True

selfdrive/car/toyota/values.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class CarControllerParams:
1616
ACCEL_MIN = -3.5 # m/s2
1717

1818
STEER_MAX = 1500
19-
STEER_DELTA_UP = 12 # 1.5s time to peak torque
19+
STEER_DELTA_UP = 10 # 1.5s time to peak torque
2020
STEER_DELTA_DOWN = 25 # always lower than 45 otherwise the Rav4 faults (Prius seems ok with 50)
21-
STEER_ERROR_MAX = 450 # max delta between torque cmd and torque motor
21+
STEER_ERROR_MAX = 350 # max delta between torque cmd and torque motor
2222

2323
class CAR:
2424
# Toyota

0 commit comments

Comments
 (0)