From 97ad004fe15bae2ceb5f80b69c6230ea0472be4a Mon Sep 17 00:00:00 2001 From: ohber <44625404+ohber@users.noreply.github.com> Date: Fri, 6 Nov 2020 13:32:32 -0500 Subject: [PATCH] Genesis G70 fingerprint and tuning (#2491) * Modify tuning and values.py for G70 support * revert ignored fingerprint change Co-authored-by: Adeeb Shihadeh old-commit-hash: 548d92490d3a4c7925d28a4079382682b15284e7 --- selfdrive/car/hyundai/interface.py | 13 ++++++++----- selfdrive/car/hyundai/values.py | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 847401eaa3..6d8f97d4ae 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -155,12 +155,15 @@ class CarInterface(CarInterfaceBase): # Genesis elif candidate == CAR.GENESIS_G70: - ret.lateralTuning.pid.kf = 0.00005 - ret.mass = 1640. + STD_CARGO_KG + ret.lateralTuning.init('indi') + ret.lateralTuning.indi.innerLoopGain = 2.5 + ret.lateralTuning.indi.outerLoopGain = 3.5 + ret.lateralTuning.indi.timeConstant = 1.4 + ret.lateralTuning.indi.actuatorEffectiveness = 1.8 + ret.steerActuatorDelay = 0.1 + ret.mass = 1640.0 + STD_CARGO_KG ret.wheelbase = 2.84 - ret.steerRatio = 16.5 - ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] + ret.steerRatio = 13.56 elif candidate == CAR.GENESIS_G80: ret.lateralTuning.pid.kf = 0.00005 ret.mass = 2060. + STD_CARGO_KG diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 184b27a0bd..c8dd969dd0 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -7,7 +7,7 @@ Ecu = car.CarParams.Ecu # Steer torque limits class SteerLimitParams: def __init__(self, CP): - if CP.carFingerprint in [CAR.SONATA, CAR.PALISADE, CAR.SANTA_FE, CAR.VELOSTER]: + if CP.carFingerprint in [CAR.SONATA, CAR.PALISADE, CAR.SANTA_FE, CAR.VELOSTER, CAR.GENESIS_G70]: self.STEER_MAX = 384 else: self.STEER_MAX = 255