Skip to content

Commit 806ffdf

Browse files
committed
update tune, rate limits not permanent
1 parent 67fc361 commit 806ffdf

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

selfdrive/car/toyota/interface.py

Lines changed: 3 additions & 13 deletions
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, CAR.CAMRYH_TSS2]: # These cars use LQR/INDI
28+
if candidate not in [CAR.PRIUS, CAR.RAV4, CAR.RAV4H]: # These cars use LQR/INDI
2929
ret.lateralTuning.init('pid')
3030
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]]
3131

@@ -134,18 +134,8 @@ 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.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
137+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.4], [0.1]]
138+
ret.lateralTuning.pid.kf = 0.00006
149139

150140
elif candidate in [CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2]:
151141
stop_and_go = True

selfdrive/car/toyota/values.py

Lines changed: 2 additions & 2 deletions
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 = 10 # 1.5s time to peak torque
19+
STEER_DELTA_UP = 12 # 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 = 350 # max delta between torque cmd and torque motor
21+
STEER_ERROR_MAX = 450 # max delta between torque cmd and torque motor
2222

2323
class CAR:
2424
PRIUS = "TOYOTA PRIUS 2017"

0 commit comments

Comments
 (0)