Skip to content

Commit

Permalink
return RAV4 longitudinal tuning and add commaai#1260
Browse files Browse the repository at this point in the history
  • Loading branch information
arne182 authored Mar 24, 2020
1 parent 310cbaf commit b00c7bd
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False,

ret.lateralTuning.lqr.scale = 1500.0
ret.lateralTuning.lqr.ki = 0.06
ret.longitudinalTuning.kpV = [0.1, 0.3, 0.3] # braking tune
ret.longitudinalTuning.kiV = [0.1, 0.1]
ret.longitudinalTuning.kpV = [0.325, 0.325, 0.325] # braking tune
ret.longitudinalTuning.kiV = [0.15, 0.1]
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
ret.lateralTuning.lqr.c = [1., 0.]
Expand Down Expand Up @@ -237,29 +237,19 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False,
ret.wheelbase = 2.68986
ret.steerRatio = 14.3
tire_stiffness_factor = 0.7933
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.15], [0.05]]
ret.mass = 3370. * CV.LB_TO_KG + STD_CARGO_KG
ret.lateralTuning.pid.kf = 0.00007818594

elif candidate == CAR.RAV4H_TSS2:
stop_and_go = True
ret.safetyParam = 73
ret.wheelbase = 2.68986
ret.steerRatio = 14.3
tire_stiffness_factor = 0.7933
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]]
ret.mass = 3800. * CV.LB_TO_KG + STD_CARGO_KG
ret.lateralTuning.pid.kf = 0.00007818594
ret.lateralTuning.pid.kf = 0.00004

elif candidate == CAR.RAV4H_TSS2:
stop_and_go = True
ret.safetyParam = 73
ret.wheelbase = 2.68986
ret.steerRatio = 14.3
tire_stiffness_factor = 0.7933
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.15], [0.05]]
ret.mass = 3800. * CV.LB_TO_KG + STD_CARGO_KG
ret.lateralTuning.pid.kf = 0.00007818594
ret.lateralTuning.pid.kf = 0.00004

elif candidate in [CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2]:
stop_and_go = True
Expand Down

0 comments on commit b00c7bd

Please sign in to comment.