Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Update interface.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cgw1968-5779 authored Feb 14, 2021
1 parent cde4de7 commit 603b2c5
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,44 +243,50 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False,
ret.safetyParam = 56
ret.wheelbase = 2.68986
ret.steerRatio = 14.3
ret.steerRateCost = 0.45
ret.steerRateCost = 0.3
tire_stiffness_factor = 0.7933
ret.mass = 3370. * CV.LB_TO_KG + STD_CARGO_KG
ret.longitudinalTuning.kpV = [2.1, 1.2, 0.34]
ret.longitudinalTuning.kiV = [0.54, 0.34]
ret.steerActuatorDelay = 0.35
ret.steerLimitTimer = 5.0
ret.stoppingBrakeRate = 0.16 # reach stopping target smoothly
ret.startingBrakeRate = 0.75 # release brakes fast
ret.startAccel = 1.30 # Accelerate from 0 faster
ret.steerActuatorDelay = 0.12
ret.steerLimitTimer = 0.1
ret.lateralTuning.init('indi')
ret.lateralTuning.indi.innerLoopGainBP = [16.7, 25, 36.1]
ret.lateralTuning.indi.innerLoopGainV = [9.5, 15, 15]
ret.lateralTuning.indi.outerLoopGainBP = [16.7, 25, 36.1]
ret.lateralTuning.indi.outerLoopGainV = [9.5, 14.99, 14.99]
ret.lateralTuning.indi.timeConstantBP = [16.7, 16.71, 22, 22.01, 26, 26.01, 36, 36.01]
ret.lateralTuning.indi.timeConstantV = [0.5, 1, 1, 2, 2, 4, 4, 5]
ret.lateralTuning.indi.actuatorEffectivenessBP = [16.7, 25, 36.1]
ret.lateralTuning.indi.actuatorEffectivenessV = [9.5, 15, 15]
ret.lateralTuning.indi.innerLoopGainBP = [16.7, 25]
ret.lateralTuning.indi.innerLoopGainV = [15, 15]
ret.lateralTuning.indi.outerLoopGainBP = [8.3, 11.1, 13.9, 16.7, 19.4, 22.2, 25, 30.1, 33.3, 36.1]
ret.lateralTuning.indi.outerLoopGainV = [4.6, 6.2, 8.3, 10.4, 12.8, 14.99, 16, 17, 18, 19]
ret.lateralTuning.indi.timeConstantBP = [8.3, 11.1, 13.9, 16.7, 19.4, 22.2, 25, 30.1, 33.3, 36.1]
ret.lateralTuning.indi.timeConstantV = [1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.0, 4.0, 4.0]
ret.lateralTuning.indi.actuatorEffectivenessBP = [16.7, 25]
ret.lateralTuning.indi.actuatorEffectivenessV = [15, 15]

elif candidate == CAR.RAV4H_TSS2:
stop_and_go = True
ret.safetyParam = 56
ret.wheelbase = 2.68986
ret.steerRatio = 14.3
ret.steerRateCost = 0.45
ret.steerRateCost = 0.3
tire_stiffness_factor = 0.7933
ret.mass = 3370. * CV.LB_TO_KG + STD_CARGO_KG
ret.longitudinalTuning.kpV = [2.1, 1.2, 0.34]
ret.longitudinalTuning.kiV = [0.54, 0.34]
ret.steerActuatorDelay = 0.35
ret.steerLimitTimer = 5.0
ret.stoppingBrakeRate = 0.16 # reach stopping target smoothly
ret.startingBrakeRate = 0.75 # release brakes fast
ret.startAccel = 1.30 # Accelerate from 0 faster
ret.steerActuatorDelay = 0.12
ret.steerLimitTimer = 0.1
ret.lateralTuning.init('indi')
ret.lateralTuning.indi.innerLoopGainBP = [16.7, 25, 36.1]
ret.lateralTuning.indi.innerLoopGainV = [9.5, 15, 15]
ret.lateralTuning.indi.outerLoopGainBP = [16.7, 25, 36.1]
ret.lateralTuning.indi.outerLoopGainV = [9.5, 14.99, 14.99]
ret.lateralTuning.indi.timeConstantBP = [16.7, 16.71, 22, 22.01, 26, 26.01, 36, 36.01]
ret.lateralTuning.indi.timeConstantV = [0.5, 1, 1, 2, 2, 4, 4, 5]
ret.lateralTuning.indi.actuatorEffectivenessBP = [16.7, 25, 36.1]
ret.lateralTuning.indi.actuatorEffectivenessV = [9.5, 15, 15]
ret.lateralTuning.indi.innerLoopGainBP = [16.7, 25]
ret.lateralTuning.indi.innerLoopGainV = [15, 15]
ret.lateralTuning.indi.outerLoopGainBP = [8.3, 11.1, 13.9, 16.7, 19.4, 22.2, 25, 30.1, 33.3, 36.1]
ret.lateralTuning.indi.outerLoopGainV = [4.6, 6.2, 8.3, 10.4, 12.8, 14.99, 16, 17, 18, 19]
ret.lateralTuning.indi.timeConstantBP = [8.3, 11.1, 13.9, 16.7, 19.4, 22.2, 25, 30.1, 33.3, 36.1]
ret.lateralTuning.indi.timeConstantV = [1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.0, 4.0, 4.0]
ret.lateralTuning.indi.actuatorEffectivenessBP = [16.7, 25]
ret.lateralTuning.indi.actuatorEffectivenessV = [15, 15]

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

0 comments on commit 603b2c5

Please sign in to comment.