From 1b33f98d81a5fb064cc2c319ea62b374eef1595a Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 25 Jul 2022 15:16:38 -0700 Subject: [PATCH] Mazda: use torque controller (#25265) * Mazda: use torque controller * update refs * update refs old-commit-hash: 347455325e5cd67e0697708ac980782aec2c3b33 --- selfdrive/car/mazda/interface.py | 14 ++------------ selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/selfdrive/car/mazda/interface.py b/selfdrive/car/mazda/interface.py index 35e3c1bb01..8640903444 100755 --- a/selfdrive/car/mazda/interface.py +++ b/selfdrive/car/mazda/interface.py @@ -28,34 +28,24 @@ class CarInterface(CarInterfaceBase): ret.steerLimitTimer = 0.8 tire_stiffness_factor = 0.70 # not optimized yet + CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) + if candidate in (CAR.CX5, CAR.CX5_2022): ret.mass = 3655 * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.7 ret.steerRatio = 15.5 - ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.19], [0.019]] - ret.lateralTuning.pid.kf = 0.00006 elif candidate in (CAR.CX9, CAR.CX9_2021): ret.mass = 4217 * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 3.1 ret.steerRatio = 17.6 - ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.19], [0.019]] - ret.lateralTuning.pid.kf = 0.00006 elif candidate == CAR.MAZDA3: ret.mass = 2875 * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.7 ret.steerRatio = 14.0 - ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.19], [0.019]] - ret.lateralTuning.pid.kf = 0.00006 elif candidate == CAR.MAZDA6: ret.mass = 3443 * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.83 ret.steerRatio = 15.5 - ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.19], [0.019]] - ret.lateralTuning.pid.kf = 0.00006 if candidate not in (CAR.CX5_2022, ): ret.minSteerSpeed = LKAS_LIMITS.DISABLE_SPEED * CV.KPH_TO_MS diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 0d05747644..5067208d0e 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -ee36966d20fa63ed4b9488bbc75d61e95e464cb7 \ No newline at end of file +2da0446f3cc0c4fd705f7b199ed1d9e6341fc466 \ No newline at end of file