From 4c34bc726fdffd191e15f2ff6bde28248b9e2efa Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:48:20 -0700 Subject: [PATCH] Vehicles - Toyota - Longitudinal Tune - DragonPilot Co-Authored-By: eFini <16603033+efinilan@users.noreply.github.com> Co-Authored-By: Kumar <36933347+rav4kumar@users.noreply.github.com> --- selfdrive/car/toyota/interface.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 816ee659e..4666cc5e3 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -146,6 +146,19 @@ class CarInterface(CarInterfaceBase): else: tune.kpV = [0.0] tune.kiV = [1.2] # appears to produce minimal oscillation on TSS-P + elif (candidate in TSS2_CAR or ret.enableGasInterceptor) and params.get_bool("DragonPilotTune"): + # Credit goes to the DragonPilot team! + if candidate in TSS2_CAR: + tune.kiBP = [0., 0.1, 1., 2., 3., 5., 8., 12., 14., 20., 26., 36., 50] + tune.kiV = [0.346, 0.35, 0.33, 0.309, 0.287, 0.228, 0.222, 0.2085, 0.19, 0.17, 0.10, 0.06, 0.01] + ret.vEgoStopping = 0.25 + ret.vEgoStarting = 0.25 + ret.stopAccel = -0.40 + ret.stoppingDecelRate = 0.40 + else: + tune.kiBP = [0., 35.] + tune.kpV = [3.6, 2.4, 1.5] + tune.kiV = [0.54, 0.36] elif candidate in TSS2_CAR or ret.enableGasInterceptor: tune.kpV = [0.0] tune.kiV = [0.5]