From 9ed9283798db18f85f315c9e2c40126684ee3ff7 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 09:33:29 -0400 Subject: [PATCH 01/15] adding standard Honda long tuning to Bosch --- opendbc/car/honda/interface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index d92bcc24d5..84e6ae5982 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -88,10 +88,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.longitudinalActuatorDelay = 0.5 # s if candidate in HONDA_BOSCH_RADARLESS: ret.stopAccel = CarControllerParams.BOSCH_ACCEL_MIN # stock uses -4.0 m/s^2 once stopped but limited by safety model - else: - # default longitudinal tuning for all hondas - ret.longitudinalTuning.kiBP = [0., 5., 35.] - ret.longitudinalTuning.kiV = [1.2, 0.8, 0.5] + + # default longitudinal tuning for all hondas + ret.longitudinalTuning.kiBP = [0., 5., 35.] + ret.longitudinalTuning.kiV = [1.2, 0.8, 0.5] eps_modified = False for fw in car_fw: From 90677bbcc0e226112743c9a046dc1ba8fdd189bf Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 09:34:45 -0400 Subject: [PATCH 02/15] adding wind brake to Bosch --- opendbc/car/honda/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 16255d542e..de6924fff6 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -207,7 +207,7 @@ def update(self, CC, CS, now_nanos): if self.CP.carFingerprint in HONDA_BOSCH: self.accel = float(np.clip(accel, self.params.BOSCH_ACCEL_MIN, self.params.BOSCH_ACCEL_MAX)) - self.gas = float(np.interp(accel, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) + self.gas = float(np.interp(accel + wind_brake, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) stopping = actuators.longControlState == LongCtrlState.stopping self.stopping_counter = self.stopping_counter + 1 if stopping else 0 From 1ad7556d71f114fc6a96b918cb375370215bd38e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 08:08:08 -0400 Subject: [PATCH 03/15] Add hill brake --- opendbc/car/honda/carcontroller.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index de6924fff6..0421d1424d 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -1,8 +1,9 @@ import numpy as np from collections import namedtuple +import math from opendbc.can.packer import CANPacker -from opendbc.car import Bus, DT_CTRL, rate_limit, make_tester_present_msg, structs +from opendbc.car import ACCELERATION_DUE_TO_GRAVITY, Bus, DT_CTRL, rate_limit, make_tester_present_msg, structs from opendbc.car.honda import hondacan from opendbc.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, CarControllerParams from opendbc.car.interfaces import CarControllerBase @@ -115,6 +116,7 @@ def __init__(self, dbc_names, CP): self.gas = 0.0 self.brake = 0.0 self.last_torque = 0.0 + self.pitch = 0.0 def update(self, CC, CS, now_nanos): actuators = CC.actuators @@ -123,6 +125,9 @@ def update(self, CC, CS, now_nanos): hud_v_cruise = hud_control.setSpeed / conversion if hud_control.speedVisible else 255 pcm_cancel_cmd = CC.cruiseControl.cancel + if len(CC.orientationNED) == 3: + self.pitch = CC.orientationNED[1] + if CC.longActive: accel = actuators.accel gas, brake = compute_gas_brake(actuators.accel, CS.out.vEgo, self.CP.carFingerprint) @@ -164,6 +169,7 @@ def update(self, CC, CS, now_nanos): # wind brake from air resistance decel at high speed wind_brake = np.interp(CS.out.vEgo, [0.0, 2.3, 35.0], [0.001, 0.002, 0.15]) + hill_brake = math.sin(self.pitch) * ACCELERATION_DUE_TO_GRAVITY # all of this is only relevant for HONDA NIDEC max_accel = np.interp(CS.out.vEgo, self.params.NIDEC_MAX_ACCEL_BP, self.params.NIDEC_MAX_ACCEL_V) # TODO this 1.44 is just to maintain previous behavior @@ -207,12 +213,12 @@ def update(self, CC, CS, now_nanos): if self.CP.carFingerprint in HONDA_BOSCH: self.accel = float(np.clip(accel, self.params.BOSCH_ACCEL_MIN, self.params.BOSCH_ACCEL_MAX)) - self.gas = float(np.interp(accel + wind_brake, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) + self.gas = float(np.interp(accel + wind_brake + hill_brake, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) stopping = actuators.longControlState == LongCtrlState.stopping self.stopping_counter = self.stopping_counter + 1 if stopping else 0 can_sends.extend(hondacan.create_acc_commands(self.packer, self.CAN, CC.enabled, CC.longActive, self.accel, self.gas, - self.stopping_counter, self.CP.carFingerprint)) + self.stopping_counter, self.CP.carFingerprint, wind_brake + hill_brake)) else: apply_brake = np.clip(self.brake_last - wind_brake, 0.0, 1.0) apply_brake = int(np.clip(apply_brake * self.params.NIDEC_BRAKE_MAX, 0, self.params.NIDEC_BRAKE_MAX - 1)) From 4940c5f699ebe0bf1b1960036da60494e1557b75 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 08:09:20 -0400 Subject: [PATCH 04/15] add hill brake --- opendbc/car/honda/hondacan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index ec2c5d25ae..ea14ea094c 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -74,14 +74,14 @@ def create_brake_command(packer, CAN, apply_brake, pump_on, pcm_override, pcm_ca return packer.make_can_msg("BRAKE_COMMAND", CAN.pt, values) -def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_counter, car_fingerprint): +def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_counter, car_fingerprint, extra_brake): commands = [] min_gas_accel = CarControllerParams.BOSCH_GAS_LOOKUP_BP[0] control_on = 5 if enabled else 0 gas_command = gas if active and accel > min_gas_accel else -30000 accel_command = accel if active else 0 - braking = 1 if active and accel < min_gas_accel else 0 + braking = 1 if active and (accel + extra_brake) < min_gas_accel else 0 standstill = 1 if active and stopping_counter > 0 else 0 standstill_release = 1 if active and stopping_counter == 0 else 0 From 3efdbf219e1f2a7ee015461e006a259b6b8353e8 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 22:41:22 -0400 Subject: [PATCH 05/15] revise Bosch wind brake to m/s2 units --- opendbc/car/honda/carcontroller.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 0421d1424d..c82af5d4f6 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -168,9 +168,11 @@ def update(self, CC, CS, now_nanos): can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive)) # wind brake from air resistance decel at high speed - wind_brake = np.interp(CS.out.vEgo, [0.0, 2.3, 35.0], [0.001, 0.002, 0.15]) + wind_brake_ms2 = np.interp(CS.out.vEgo, [0.0, 13.4, 22.4, 31.3, 40.2], [0.000, 0.049, 0.136, 0.267, 0.441]) # in m/s2 units hill_brake = math.sin(self.pitch) * ACCELERATION_DUE_TO_GRAVITY + # all of this is only relevant for HONDA NIDEC + wind_brake = np.interp(CS.out.vEgo, [0.0, 2.3, 35.0], [0.001, 0.002, 0.15]) # not in m/s2 units max_accel = np.interp(CS.out.vEgo, self.params.NIDEC_MAX_ACCEL_BP, self.params.NIDEC_MAX_ACCEL_V) # TODO this 1.44 is just to maintain previous behavior pcm_speed_BP = [-wind_brake, @@ -213,12 +215,12 @@ def update(self, CC, CS, now_nanos): if self.CP.carFingerprint in HONDA_BOSCH: self.accel = float(np.clip(accel, self.params.BOSCH_ACCEL_MIN, self.params.BOSCH_ACCEL_MAX)) - self.gas = float(np.interp(accel + wind_brake + hill_brake, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) + self.gas = float(np.interp(accel + wind_brake_ms2 + hill_brake, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) stopping = actuators.longControlState == LongCtrlState.stopping self.stopping_counter = self.stopping_counter + 1 if stopping else 0 can_sends.extend(hondacan.create_acc_commands(self.packer, self.CAN, CC.enabled, CC.longActive, self.accel, self.gas, - self.stopping_counter, self.CP.carFingerprint, wind_brake + hill_brake)) + self.stopping_counter, self.CP.carFingerprint, wind_brake_ms2 + hill_brake)) else: apply_brake = np.clip(self.brake_last - wind_brake, 0.0, 1.0) apply_brake = int(np.clip(apply_brake * self.params.NIDEC_BRAKE_MAX, 0, self.params.NIDEC_BRAKE_MAX - 1)) From 2a94e80828de6b7227bc568122d5ec6e4c91faec Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 22:44:11 -0400 Subject: [PATCH 06/15] whitespace fix --- opendbc/car/honda/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index c82af5d4f6..b1658e9c6f 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -170,7 +170,7 @@ def update(self, CC, CS, now_nanos): # wind brake from air resistance decel at high speed wind_brake_ms2 = np.interp(CS.out.vEgo, [0.0, 13.4, 22.4, 31.3, 40.2], [0.000, 0.049, 0.136, 0.267, 0.441]) # in m/s2 units hill_brake = math.sin(self.pitch) * ACCELERATION_DUE_TO_GRAVITY - + # all of this is only relevant for HONDA NIDEC wind_brake = np.interp(CS.out.vEgo, [0.0, 2.3, 35.0], [0.001, 0.002, 0.15]) # not in m/s2 units max_accel = np.interp(CS.out.vEgo, self.params.NIDEC_MAX_ACCEL_BP, self.params.NIDEC_MAX_ACCEL_V) From 37679b2b7d844141f2693c30e6f9846bbe1ced06 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 3 May 2025 02:28:34 -0400 Subject: [PATCH 07/15] revise to gas_force --- opendbc/car/honda/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index b1658e9c6f..8a3b3eca55 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -220,7 +220,7 @@ def update(self, CC, CS, now_nanos): stopping = actuators.longControlState == LongCtrlState.stopping self.stopping_counter = self.stopping_counter + 1 if stopping else 0 can_sends.extend(hondacan.create_acc_commands(self.packer, self.CAN, CC.enabled, CC.longActive, self.accel, self.gas, - self.stopping_counter, self.CP.carFingerprint, wind_brake_ms2 + hill_brake)) + self.stopping_counter, self.CP.carFingerprint, accel + wind_brake_ms2 + hill_brake)) else: apply_brake = np.clip(self.brake_last - wind_brake, 0.0, 1.0) apply_brake = int(np.clip(apply_brake * self.params.NIDEC_BRAKE_MAX, 0, self.params.NIDEC_BRAKE_MAX - 1)) From 5c11a59c1aa467479717bb4d83837c3ee3ecc27e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 3 May 2025 02:29:59 -0400 Subject: [PATCH 08/15] revise to gas_force --- opendbc/car/honda/hondacan.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index ea14ea094c..6b11bf0284 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -74,14 +74,14 @@ def create_brake_command(packer, CAN, apply_brake, pump_on, pcm_override, pcm_ca return packer.make_can_msg("BRAKE_COMMAND", CAN.pt, values) -def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_counter, car_fingerprint, extra_brake): +def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_counter, car_fingerprint, gas_force): commands = [] min_gas_accel = CarControllerParams.BOSCH_GAS_LOOKUP_BP[0] control_on = 5 if enabled else 0 - gas_command = gas if active and accel > min_gas_accel else -30000 + gas_command = gas if active and gas_force > min_gas_accel else -30000 accel_command = accel if active else 0 - braking = 1 if active and (accel + extra_brake) < min_gas_accel else 0 + braking = 1 if active and gas_force < min_gas_accel else 0 standstill = 1 if active and stopping_counter > 0 else 0 standstill_release = 1 if active and stopping_counter == 0 else 0 From 18dca6b499e7f3c6a91d86fdf995229fe80555ec Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 3 May 2025 20:18:38 -0400 Subject: [PATCH 09/15] allow braking during uphill decelaration --- opendbc/car/honda/hondacan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index 6b11bf0284..080fc2bcbf 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -81,7 +81,7 @@ def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_count control_on = 5 if enabled else 0 gas_command = gas if active and gas_force > min_gas_accel else -30000 accel_command = accel if active else 0 - braking = 1 if active and gas_force < min_gas_accel else 0 + braking = 1 if active and min ( accel, gas_force ) < min_gas_accel else 0 standstill = 1 if active and stopping_counter > 0 else 0 standstill_release = 1 if active and stopping_counter == 0 else 0 From 07626225b004e5e7dc3572efb0b7125d4fe7b01e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 5 May 2025 01:44:21 -0400 Subject: [PATCH 10/15] update braking to never overlap --- opendbc/car/honda/hondacan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index 080fc2bcbf..6b11bf0284 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -81,7 +81,7 @@ def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_count control_on = 5 if enabled else 0 gas_command = gas if active and gas_force > min_gas_accel else -30000 accel_command = accel if active else 0 - braking = 1 if active and min ( accel, gas_force ) < min_gas_accel else 0 + braking = 1 if active and gas_force < min_gas_accel else 0 standstill = 1 if active and stopping_counter > 0 else 0 standstill_release = 1 if active and stopping_counter == 0 else 0 From a6d434a6970d07ea090cb2bfce0e4688c47bef9c Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sun, 1 Jun 2025 12:59:05 -0400 Subject: [PATCH 11/15] add GasOnly Tuning class --- opendbc/car/honda/values.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 4e8ad3ee54..9827f10216 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -83,6 +83,10 @@ class CruiseSettings: DISTANCE = 3 LKAS = 1 +class GasOnlyTuning: # values set in interface + kiBP = [0.] + kiV = [0.] + # See dbc files for info on values VISUAL_HUD = { From 89cbcff76dd9c289739ab57016c53da6a51e2fa1 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sun, 1 Jun 2025 13:01:44 -0400 Subject: [PATCH 12/15] Assign GasOnlyTuning values --- opendbc/car/honda/interface.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index e464cf1f3b..5c23f6ec54 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -5,7 +5,8 @@ from opendbc.car.disable_ecu import disable_ecu from opendbc.car.honda.hondacan import CanBus from opendbc.car.honda.values import CarControllerParams, HondaFlags, CAR, HONDA_BOSCH, HONDA_BOSCH_CANFD, \ - HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, HondaSafetyFlags + HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, HondaSafetyFlags, \ + GasOnlyTuning from opendbc.car.honda.carcontroller import CarController from opendbc.car.honda.carstate import CarState from opendbc.car.honda.radar_interface import RadarInterface @@ -86,10 +87,13 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo if candidate in HONDA_BOSCH: ret.longitudinalActuatorDelay = 0.5 # s + # default longitudinal gas-only tuning for all Bosch hondas + GasOnlyTuning.kiBP = [0., 5., 35.] + GasOnlyTuning.kiV = [1.2, 0.8, 0.5] if candidate in HONDA_BOSCH_RADARLESS: ret.stopAccel = CarControllerParams.BOSCH_ACCEL_MIN # stock uses -4.0 m/s^2 once stopped but limited by safety model else: - # default longitudinal tuning for all hondas + # default longitudinal tuning for all Nidec hondas ret.longitudinalTuning.kiBP = [0., 5., 35.] ret.longitudinalTuning.kiV = [1.2, 0.8, 0.5] From fa22ed3ec8587e69ef7f448bbd28cc2d52f3921b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sun, 1 Jun 2025 13:12:14 -0400 Subject: [PATCH 13/15] create gas only pid --- opendbc/car/honda/carcontroller.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 16255d542e..16cb63df83 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -4,8 +4,10 @@ from opendbc.can.packer import CANPacker from opendbc.car import Bus, DT_CTRL, rate_limit, make_tester_present_msg, structs from opendbc.car.honda import hondacan -from opendbc.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, CarControllerParams +from opendbc.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, \ + CarControllerParams, GasOnlyTuning from opendbc.car.interfaces import CarControllerBase +from opendbc.car.common.pid import PIDController VisualAlert = structs.CarControl.HUDControl.VisualAlert LongCtrlState = structs.CarControl.Actuators.LongControlState @@ -115,6 +117,9 @@ def __init__(self, dbc_names, CP): self.gas = 0.0 self.brake = 0.0 self.last_torque = 0.0 + self.gasonly_pid = PIDController (k_p=([0,], [0,]), + k_i=(GasOnlyTuning.kiBP, GasOnlyTuning.kiV), + k_f=1, rate=2 / DT_CTRL ) def update(self, CC, CS, now_nanos): actuators = CC.actuators @@ -207,7 +212,11 @@ def update(self, CC, CS, now_nanos): if self.CP.carFingerprint in HONDA_BOSCH: self.accel = float(np.clip(accel, self.params.BOSCH_ACCEL_MIN, self.params.BOSCH_ACCEL_MAX)) - self.gas = float(np.interp(accel, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) + + # perform a gas-only pid + gas_error = self.accel - CS.out.aEgo + gas_pedal_force = self.gasonly_pid.update(gas_error, speed=CS.out.vEgo, feedforward=self.accel) + self.gas = float(np.interp(gas_pedal_force, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) stopping = actuators.longControlState == LongCtrlState.stopping self.stopping_counter = self.stopping_counter + 1 if stopping else 0 From 5afbe95e46ae087485dda804965e0e0d0fef590b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sun, 1 Jun 2025 13:25:33 -0400 Subject: [PATCH 14/15] whitespace fix --- opendbc/car/honda/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 16cb63df83..43005d5b82 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -215,7 +215,7 @@ def update(self, CC, CS, now_nanos): # perform a gas-only pid gas_error = self.accel - CS.out.aEgo - gas_pedal_force = self.gasonly_pid.update(gas_error, speed=CS.out.vEgo, feedforward=self.accel) + gas_pedal_force = self.gasonly_pid.update(gas_error, speed=CS.out.vEgo, feedforward=self.accel) self.gas = float(np.interp(gas_pedal_force, self.params.BOSCH_GAS_LOOKUP_BP, self.params.BOSCH_GAS_LOOKUP_V)) stopping = actuators.longControlState == LongCtrlState.stopping From d7fdee89483758349e6d47599568fdb1c368db26 Mon Sep 17 00:00:00 2001 From: mvl Date: Sun, 1 Jun 2025 14:23:34 -0400 Subject: [PATCH 15/15] Revert gasonly pid from pr 2179 This reverts commit 9ed9283798db18f85f315c9e2c40126684ee3ff7. --- opendbc/car/honda/interface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index cd3b43862f..e464cf1f3b 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -88,10 +88,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.longitudinalActuatorDelay = 0.5 # s if candidate in HONDA_BOSCH_RADARLESS: ret.stopAccel = CarControllerParams.BOSCH_ACCEL_MIN # stock uses -4.0 m/s^2 once stopped but limited by safety model - - # default longitudinal tuning for all hondas - ret.longitudinalTuning.kiBP = [0., 5., 35.] - ret.longitudinalTuning.kiV = [1.2, 0.8, 0.5] + else: + # default longitudinal tuning for all hondas + ret.longitudinalTuning.kiBP = [0., 5., 35.] + ret.longitudinalTuning.kiV = [1.2, 0.8, 0.5] eps_modified = False for fw in car_fw: