From 74cee23127882ba23e5e76488470e5d5f68203d2 Mon Sep 17 00:00:00 2001 From: Arne Schwarck Date: Mon, 29 Apr 2019 17:32:29 +0200 Subject: [PATCH] Wocsor 2019 rav4 commaai#520 --- selfdrive/car/toyota/interface.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 1870e296923841..19227dcb3b66e1 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -136,7 +136,18 @@ def get_params(candidate, fingerprint): ret.gasMaxV = [0.2, 0.5, 0.7] ret.longitudinalKpV = [2.0, 1.0, 0.8] ret.longitudinalKiV = [0.25, 0.14] - + elif candidate == CAR.RAV4_2019: + stop_and_go = True + ret.safetyParam = 100 + ret.wheelbase = 2.68986 + ret.steerRatio = 14.3 + tire_stiffness_factor = 0.7933 + ret.mass = 3370. * CV.LB_TO_KG + std_cargo + ret.steerKpV, ret.steerKiV = [[0.3], [0.1]] + ret.steerKf = 0.00007818594 + ret.longitudinalKpV = [2.0, 1.0, 0.8] + ret.longitudinalKiV = [0.25, 0.14] + ret.gasMaxV = [0.2, 0.5, 0.7] elif candidate == CAR.COROLLA: stop_and_go = False ret.safetyParam = 100 # see conversion factor for STEER_TORQUE_EPS in dbc file @@ -341,7 +352,7 @@ def update(self, c): ret.cruiseState.available = bool(self.CS.main_on) ret.cruiseState.speedOffset = 0. - if self.CP.carFingerprint in [CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER] or self.CP.enableGasInterceptor: + if self.CP.carFingerprint in [CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.RAV4_2019] or self.CP.enableGasInterceptor: # ignore standstill in hybrid vehicles, since pcm allows to restart without # receiving any special command # also if interceptor is detected