From c8336ee373b42a3c7d77b50aedbeed4064a3b717 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 21:00:30 -0400 Subject: [PATCH 01/88] Cleanup_carstate_doors --- opendbc/car/honda/carstate.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 7fb19b3b8f9..bb1ba2572c9 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -68,9 +68,7 @@ def get_can_messages(CP, gearbox_msg): else: messages.append(("CRUISE_PARAMS", 50)) - if CP.carFingerprint not in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH_RADARLESS, - *HONDA_BOSCH_CANFD): + if CP.carFingerprint == HONDA_CRV_5G or CP.carFingerprint not in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH): messages.append(("DOORS_STATUS", 3)) if CP.carFingerprint in HONDA_BOSCH_RADARLESS: @@ -136,8 +134,7 @@ def update(self, can_parsers) -> structs.CarState: # panda checks if the signal is non-zero ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5 # TODO: find a common signal across all cars - if self.CP.carFingerprint in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): + if (self.CP.carFingerprint in HONDA_BOSCH) and (self.CP.carFingerprint != HONDA_CRV_5G): ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"]) elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV): ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"]) From 0e33627b368a56d8091f021a27ebdec42b8f644e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 21:05:27 -0400 Subject: [PATCH 02/88] typo fix --- opendbc/car/honda/carstate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index bb1ba2572c9..87ed8ec739c 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -68,7 +68,7 @@ def get_can_messages(CP, gearbox_msg): else: messages.append(("CRUISE_PARAMS", 50)) - if CP.carFingerprint == HONDA_CRV_5G or CP.carFingerprint not in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH): + if CP.carFingerprint == CAR.HONDA_CRV_5G or CP.carFingerprint not in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH): messages.append(("DOORS_STATUS", 3)) if CP.carFingerprint in HONDA_BOSCH_RADARLESS: @@ -134,7 +134,7 @@ def update(self, can_parsers) -> structs.CarState: # panda checks if the signal is non-zero ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5 # TODO: find a common signal across all cars - if (self.CP.carFingerprint in HONDA_BOSCH) and (self.CP.carFingerprint != HONDA_CRV_5G): + if (self.CP.carFingerprint in HONDA_BOSCH) and not (self.CP.carFingerprint == CAR.HONDA_CRV_5G): ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"]) elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV): ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"]) From f5df1f90fc5db2427129bce1920cf40ccde41d2b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 21:06:53 -0400 Subject: [PATCH 03/88] CanFD value no longer needed --- opendbc/car/honda/carstate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 87ed8ec739c..0d47e4f92b8 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -6,8 +6,7 @@ from opendbc.car import Bus, create_button_events, structs from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion -from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, \ - HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ +from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ HondaFlags, CruiseButtons, CruiseSettings, GearShifter from opendbc.car.interfaces import CarStateBase From 830f2339b1bc08b91b408abf0d2f2313efee41cd Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:19:03 -0400 Subject: [PATCH 04/88] Add RDX_MMR to gearbox message --- opendbc/car/honda/carstate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 7fb19b3b8f9..aeb3d0c72c9 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -44,7 +44,7 @@ def get_can_messages(CP, gearbox_msg): ("SCM_BUTTONS", 25), ] - if CP.carFingerprint in (CAR.HONDA_CRV_HYBRID, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.HONDA_E): + if CP.carFingerprint in (CAR.HONDA_CRV_HYBRID, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E): messages.append((gearbox_msg, 50)) else: messages.append((gearbox_msg, 100)) From 68489189d4943baa524d7ef7f3cb6ad8a25b5e4f Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:24:04 -0400 Subject: [PATCH 05/88] Imperial units on RDX --- 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 ec2c5d25ae0..fe5edea2e28 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -47,7 +47,7 @@ def body(self) -> int: def get_cruise_speed_conversion(car_fingerprint: str, is_metric: bool) -> float: # on certain cars, CRUISE_SPEED changes to imperial with car's unit setting - return CV.MPH_TO_MS if car_fingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_CANFD) and not is_metric else CV.KPH_TO_MS + return CV.MPH_TO_MS if car_fingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_CANFD | {CAR.ACURA_RDX_3G_MMR}) and not is_metric else CV.KPH_TO_MS def create_brake_command(packer, CAN, apply_brake, pump_on, pcm_override, pcm_cancel_cmd, fcw, car_fingerprint, stock_brake): From aa1bddcf0ed7dcbbfc383b603155ad3881272a11 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:29:58 -0400 Subject: [PATCH 06/88] segregate 2022 into separate fingerprints --- opendbc/car/honda/fingerprints.py | 57 +++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 307977615a3..93e74b8e51b 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -664,57 +664,78 @@ CAR.ACURA_RDX_3G: { (Ecu.vsa, 0x18da28f1, None): [ b'57114-TJB-A030\x00\x00', - b'57114-TJB-A040\x00\x00', - b'57114-TJB-A120\x00\x00', + b'57114-TJB-A040\x00\x00', ], (Ecu.fwdRadar, 0x18dab0f1, None): [ b'36802-TJB-A040\x00\x00', - b'36802-TJB-A050\x00\x00', - b'36802-TJB-A540\x00\x00', + b'36802-TJB-A050\x00\x00', ], (Ecu.fwdCamera, 0x18dab5f1, None): [ - b'36161-TJB-A040\x00\x00', - b'36161-TJB-A530\x00\x00', + b'36161-TJB-A040\x00\x00', ], (Ecu.shiftByWire, 0x18da0bf1, None): [ - b'54008-TJB-A520\x00\x00', - b'54008-TJB-A530\x00\x00', + b'54008-TJB-A520\x00\x00', ], (Ecu.transmission, 0x18da1ef1, None): [ b'28102-5YK-A610\x00\x00', b'28102-5YK-A620\x00\x00', b'28102-5YK-A630\x00\x00', b'28102-5YK-A700\x00\x00', - b'28102-5YK-A711\x00\x00', - b'28102-5YK-A800\x00\x00', + b'28102-5YK-A711\x00\x00', b'28102-5YL-A620\x00\x00', b'28102-5YL-A700\x00\x00', b'28102-5YL-A711\x00\x00', ], (Ecu.srs, 0x18da53f1, None): [ - b'77959-TJB-A040\x00\x00', - b'77959-TJB-A120\x00\x00', + b'77959-TJB-A040\x00\x00', b'77959-TJB-A210\x00\x00', ], (Ecu.electricBrakeBooster, 0x18da2bf1, None): [ b'46114-TJB-A040\x00\x00', b'46114-TJB-A050\x00\x00', - b'46114-TJB-A060\x00\x00', - b'46114-TJB-A120\x00\x00', + b'46114-TJB-A060\x00\x00', ], (Ecu.gateway, 0x18daeff1, None): [ b'38897-TJB-A040\x00\x00', b'38897-TJB-A110\x00\x00', - b'38897-TJB-A120\x00\x00', - b'38897-TJB-A220\x00\x00', + b'38897-TJB-A120\x00\x00', ], (Ecu.eps, 0x18da30f1, None): [ b'39990-TJB-A030\x00\x00', - b'39990-TJB-A040\x00\x00', - b'39990-TJB-A070\x00\x00', + b'39990-TJB-A040\x00\x00', b'39990-TJB-A130\x00\x00', ], }, + # mid-model refresh + CAR.ACURA_RDX_3G_MMR: { + (Ecu.vsa, 0x18da28f1, None): [ + b'57114-TJB-A120\x00\x00', + ], + (Ecu.fwdRadar, 0x18dab0f1, None): [ + b'36802-TJB-A540\x00\x00', + ], + (Ecu.fwdCamera, 0x18dab5f1, None): [ + b'36161-TJB-A530\x00\x00', + ], + (Ecu.shiftByWire, 0x18da0bf1, None): [ + b'54008-TJB-A530\x00\x00', + ], + (Ecu.transmission, 0x18da1ef1, None): [ + b'28102-5YK-A800\x00\x00', + ], + (Ecu.srs, 0x18da53f1, None): [ + b'77959-TJB-A120\x00\x00', + ], + (Ecu.electricBrakeBooster, 0x18da2bf1, None): [ + b'46114-TJB-A120\x00\x00', + ], + (Ecu.gateway, 0x18daeff1, None): [ + b'38897-TJB-A220\x00\x00', + ], + (Ecu.eps, 0x18da30f1, None): [ + b'39990-TJB-A070\x00\x00', + ], + }, CAR.HONDA_RIDGELINE: { (Ecu.eps, 0x18da30f1, None): [ b'39990-T6Z-A020\x00\x00', From 18da01ab54bd83317e54a3e48ebc950de4ba223a Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:32:47 -0400 Subject: [PATCH 07/88] Adding values from RDX_3G values into MMR --- opendbc/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index d92bcc24d52..34d52388316 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -170,7 +170,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 1000], [0, 1000]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] - elif candidate == CAR.ACURA_RDX_3G: + elif candidate in (CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR): ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] From 0b0f4be49896e302f7c7516e4aaba1b0ff594819 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:35:17 -0400 Subject: [PATCH 08/88] Adding RDX 3G MMR values --- opendbc/car/honda/values.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 3f845b4e4cc..d1a07ad59de 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -200,6 +200,12 @@ class CAR(Platforms): {Bus.pt: 'acura_rdx_2020_can_generated'}, flags=HondaFlags.BOSCH_ALT_BRAKE, ) + ACURA_RDX_3G_MMR = HondaBoschPlatformConfig( + [HondaCarDocs("Acura RDX 2022", "All")], + CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec + {Bus.pt: 'acura_rdx_2020_can_generated'}, + flags=HondaFlags.BOSCH_ALT_BRAKE, + ) HONDA_INSIGHT = HondaBoschPlatformConfig( [HondaCarDocs("Honda Insight 2019-22", "All", min_steer_speed=3. * CV.MPH_TO_MS)], CarSpecs(mass=2987 * CV.LB_TO_KG, wheelbase=2.7, steerRatio=15.0, centerToFrontRatio=0.39, tireStiffnessFactor=0.82), # as spec From 29ce9ff912cf810d5fd93a1073810b9503f3751f Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:46:01 -0400 Subject: [PATCH 09/88] test route for 3GRDX_MMR --- opendbc/car/tests/routes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index fa512f1a043..97042bbcb92 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -103,6 +103,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("684e8f96bd491a0e|2021-11-03--11-08-42", HONDA.HONDA_PILOT), # Passport CarTestRoute("0a78dfbacc8504ef|2020-03-04--13-29-55", HONDA.HONDA_CIVIC_BOSCH), CarTestRoute("f34a60d68d83b1e5|2020-10-06--14-35-55", HONDA.ACURA_RDX), + CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), # todo: get newer route CarTestRoute("54fd8451b3974762|2021-04-01--14-50-10", HONDA.HONDA_RIDGELINE), CarTestRoute("2d5808fae0b38ac6|2021-09-01--17-14-11", HONDA.HONDA_E), CarTestRoute("f44aa96ace22f34a|2021-12-22--06-22-31", HONDA.HONDA_CIVIC_2022), From fb76f39c98bc859fee55d7e58834e5502674d574 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 29 Apr 2025 23:47:19 -0400 Subject: [PATCH 10/88] add 3G RDX MMR --- opendbc/car/torque_data/substitute.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/opendbc/car/torque_data/substitute.toml b/opendbc/car/torque_data/substitute.toml index a91ac358957..d0c2614c458 100644 --- a/opendbc/car/torque_data/substitute.toml +++ b/opendbc/car/torque_data/substitute.toml @@ -51,6 +51,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "HONDA_CIVIC_BOSCH_DIESEL" = "HONDA_CIVIC_BOSCH" "HONDA_E" = "HONDA_CIVIC_BOSCH" "HONDA_ODYSSEY_CHN" = "HONDA_ODYSSEY" +"ACURA_RDX_3G_MMR" = "ACURA_RDX_3G" "BUICK_LACROSSE" = "CHEVROLET_VOLT" "BUICK_REGAL" = "CHEVROLET_VOLT" From 8b3510f6165d805210d7153bb0b47e7873a3ac18 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 30 Apr 2025 00:05:31 -0400 Subject: [PATCH 11/88] whitespace fix --- opendbc/car/honda/fingerprints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 93e74b8e51b..ebf5d31d1a1 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -698,11 +698,11 @@ (Ecu.gateway, 0x18daeff1, None): [ b'38897-TJB-A040\x00\x00', b'38897-TJB-A110\x00\x00', - b'38897-TJB-A120\x00\x00', + b'38897-TJB-A120\x00\x00', ], (Ecu.eps, 0x18da30f1, None): [ b'39990-TJB-A030\x00\x00', - b'39990-TJB-A040\x00\x00', + b'39990-TJB-A040\x00\x00', b'39990-TJB-A130\x00\x00', ], }, From 0f257c7bbdc5a839f52f9126207eab30bd351dee Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 30 Apr 2025 00:06:46 -0400 Subject: [PATCH 12/88] whitespace fix --- opendbc/car/honda/fingerprints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index ebf5d31d1a1..68ccbfdc4f6 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -687,13 +687,13 @@ b'28102-5YL-A711\x00\x00', ], (Ecu.srs, 0x18da53f1, None): [ - b'77959-TJB-A040\x00\x00', + b'77959-TJB-A040\x00\x00', b'77959-TJB-A210\x00\x00', ], (Ecu.electricBrakeBooster, 0x18da2bf1, None): [ b'46114-TJB-A040\x00\x00', b'46114-TJB-A050\x00\x00', - b'46114-TJB-A060\x00\x00', + b'46114-TJB-A060\x00\x00', ], (Ecu.gateway, 0x18daeff1, None): [ b'38897-TJB-A040\x00\x00', From 950732a5c94700c602a3161c64054453ff1399a6 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 30 Apr 2025 00:16:27 -0400 Subject: [PATCH 13/88] more whitespace fixes --- opendbc/car/honda/fingerprints.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 68ccbfdc4f6..b99d83c58a2 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -664,24 +664,24 @@ CAR.ACURA_RDX_3G: { (Ecu.vsa, 0x18da28f1, None): [ b'57114-TJB-A030\x00\x00', - b'57114-TJB-A040\x00\x00', + b'57114-TJB-A040\x00\x00', ], (Ecu.fwdRadar, 0x18dab0f1, None): [ b'36802-TJB-A040\x00\x00', - b'36802-TJB-A050\x00\x00', + b'36802-TJB-A050\x00\x00', ], (Ecu.fwdCamera, 0x18dab5f1, None): [ - b'36161-TJB-A040\x00\x00', + b'36161-TJB-A040\x00\x00', ], (Ecu.shiftByWire, 0x18da0bf1, None): [ - b'54008-TJB-A520\x00\x00', + b'54008-TJB-A520\x00\x00', ], (Ecu.transmission, 0x18da1ef1, None): [ b'28102-5YK-A610\x00\x00', b'28102-5YK-A620\x00\x00', b'28102-5YK-A630\x00\x00', b'28102-5YK-A700\x00\x00', - b'28102-5YK-A711\x00\x00', + b'28102-5YK-A711\x00\x00', b'28102-5YL-A620\x00\x00', b'28102-5YL-A700\x00\x00', b'28102-5YL-A711\x00\x00', From 3fc561ddd92cb2a59ec0d3ffb2d024342d50283b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 30 Apr 2025 02:07:15 -0400 Subject: [PATCH 14/88] mirroring pre-MMR extra ecu's --- opendbc/car/honda/values.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index d1a07ad59de..241ba53fcc1 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -340,9 +340,9 @@ class CAR(Platforms): # Note that we still attempt to match with them when they are present # This is or'd with (ALL_ECUS - ESSENTIAL_ECUS) from fw_versions.py non_essential_ecus={ - Ecu.eps: [CAR.ACURA_RDX_3G, CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_2022, CAR.HONDA_E, CAR.HONDA_HRV_3G], - Ecu.vsa: [CAR.ACURA_RDX_3G, CAR.HONDA_ACCORD, CAR.HONDA_CIVIC, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_2022, CAR.HONDA_CRV_5G, CAR.HONDA_CRV_HYBRID, - CAR.HONDA_E, CAR.HONDA_HRV_3G, CAR.HONDA_INSIGHT], + Ecu.eps: [CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_2022, CAR.HONDA_E, CAR.HONDA_HRV_3G], + Ecu.vsa: [CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_ACCORD, CAR.HONDA_CIVIC, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_2022, + CAR.HONDA_CRV_5G, CAR.HONDA_CRV_HYBRID, CAR.HONDA_E, CAR.HONDA_HRV_3G, CAR.HONDA_INSIGHT], }, extra_ecus=[ (Ecu.combinationMeter, 0x18da60f1, None), From 60a7598be4389aa5caa6c9ae5cf9e9e042672d85 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 01:26:55 -0400 Subject: [PATCH 15/88] including lowspeed steer warning --- opendbc/car/honda/carstate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 12f2995e756..e05cfdf8fca 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -245,6 +245,11 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.enabled = cp.vl["POWERTRAIN_DATA"]["ACC_STATUS"] != 0 ret.cruiseState.available = bool(cp.vl[self.main_on_sig_msg]["MAIN_ON"]) + # Adds low speed warning as some models disable cruise at various speeds, ignore warning under 3mph + if self.CP.carFingerprint == CAR.HONDA_ODYSSEY_5G_MMR: + ret.lowSpeedAlert = ret.cruiseState.enabled and ret.vEgo >= 4 * CV.MPH_TO_MS and \ + cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 0 and not ret.steeringPressed + # Gets rid of Pedal Grinding noise when brake is pressed at slow speeds for some models if self.CP.carFingerprint in (CAR.HONDA_PILOT, CAR.HONDA_RIDGELINE): if ret.brake > 0.1: From 378ba975498474bcab68290797c17bddb7ac580b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 01:34:18 -0400 Subject: [PATCH 16/88] Adding non-long steer minimum --- opendbc/car/honda/interface.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 34d52388316..b9f3d6e541e 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -171,7 +171,11 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] elif candidate in (CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR): - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] + if (not ret.openpilotLongitudinalControl) and (candidate == CAR.ACURA_RDX_3G_MMR): + ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactive. Used 70kph to clarify for warning message + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # clipped by radar + else: + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] elif candidate in (CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN): From 579db2cf00f5199d2f516032174b8ca5a6e4d24b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 01:35:47 -0400 Subject: [PATCH 17/88] Including minimum steer speed --- opendbc/car/honda/values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 241ba53fcc1..838d824f6f3 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -201,7 +201,7 @@ class CAR(Platforms): flags=HondaFlags.BOSCH_ALT_BRAKE, ) ACURA_RDX_3G_MMR = HondaBoschPlatformConfig( - [HondaCarDocs("Acura RDX 2022", "All")], + [HondaCarDocs("Acura RDX 2022", "All", min_steer_speed=70. * CV.KPH_TO_MS)], CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec {Bus.pt: 'acura_rdx_2020_can_generated'}, flags=HondaFlags.BOSCH_ALT_BRAKE, From 039f7fe969e40c750c717db7ea7b2c5a95767e88 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 01:40:45 -0400 Subject: [PATCH 18/88] changing comment to retry timed out CI --- opendbc/car/tests/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index 97042bbcb92..2d863cab141 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -103,7 +103,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("684e8f96bd491a0e|2021-11-03--11-08-42", HONDA.HONDA_PILOT), # Passport CarTestRoute("0a78dfbacc8504ef|2020-03-04--13-29-55", HONDA.HONDA_CIVIC_BOSCH), CarTestRoute("f34a60d68d83b1e5|2020-10-06--14-35-55", HONDA.ACURA_RDX), - CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), # todo: get newer route + CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), # todo: replace with newer route CarTestRoute("54fd8451b3974762|2021-04-01--14-50-10", HONDA.HONDA_RIDGELINE), CarTestRoute("2d5808fae0b38ac6|2021-09-01--17-14-11", HONDA.HONDA_E), CarTestRoute("f44aa96ace22f34a|2021-12-22--06-22-31", HONDA.HONDA_CIVIC_2022), From 0f89a90e41e29770973e07782efdcf5b2136efaf Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 01:42:06 -0400 Subject: [PATCH 19/88] whitespace fix --- opendbc/car/tests/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index 2d863cab141..9ee962d2878 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -103,7 +103,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("684e8f96bd491a0e|2021-11-03--11-08-42", HONDA.HONDA_PILOT), # Passport CarTestRoute("0a78dfbacc8504ef|2020-03-04--13-29-55", HONDA.HONDA_CIVIC_BOSCH), CarTestRoute("f34a60d68d83b1e5|2020-10-06--14-35-55", HONDA.ACURA_RDX), - CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), # todo: replace with newer route + CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), # todo: replace with newer route CarTestRoute("54fd8451b3974762|2021-04-01--14-50-10", HONDA.HONDA_RIDGELINE), CarTestRoute("2d5808fae0b38ac6|2021-09-01--17-14-11", HONDA.HONDA_E), CarTestRoute("f44aa96ace22f34a|2021-12-22--06-22-31", HONDA.HONDA_CIVIC_2022), From 276e79cacf3537562f02e7764bd1f242c4bd9008 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 1 May 2025 01:46:34 -0400 Subject: [PATCH 20/88] fixing copy/paste error --- opendbc/car/honda/carstate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index e05cfdf8fca..b8ef7746781 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -246,7 +246,7 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.available = bool(cp.vl[self.main_on_sig_msg]["MAIN_ON"]) # Adds low speed warning as some models disable cruise at various speeds, ignore warning under 3mph - if self.CP.carFingerprint == CAR.HONDA_ODYSSEY_5G_MMR: + if self.CP.carFingerprint == CAR.ACURA_RDX_3G_MMR: ret.lowSpeedAlert = ret.cruiseState.enabled and ret.vEgo >= 4 * CV.MPH_TO_MS and \ cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 0 and not ret.steeringPressed From 9fbaa99cf5e3fa51c484ba7fe07fe04b0d51593b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sun, 18 May 2025 22:18:29 -0400 Subject: [PATCH 21/88] fix comment spelling --- opendbc/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 41e7e6a0404..c8d325c91d3 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -177,7 +177,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo elif candidate in (CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR): if (not ret.openpilotLongitudinalControl) and (candidate == CAR.ACURA_RDX_3G_MMR): - ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactive. Used 70kph to clarify for warning message + ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactivate. Used 70kph to clarify for warning message ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # clipped by radar else: ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end From 7fcb9a8d3d287b6c0a44e2d11ab31968d8d04fc9 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 21 May 2025 16:39:47 -0400 Subject: [PATCH 22/88] Updating RDX to 2025 --- opendbc/car/honda/values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index cb3af0faaaf..b1ad11c1b2b 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -202,7 +202,7 @@ class CAR(Platforms): flags=HondaFlags.BOSCH_ALT_BRAKE, ) ACURA_RDX_3G_MMR = HondaBoschPlatformConfig( - [HondaCarDocs("Acura RDX 2022", "All", min_steer_speed=70. * CV.KPH_TO_MS)], + [HondaCarDocs("Acura RDX 2022-25", "All", min_steer_speed=70. * CV.KPH_TO_MS)], CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec {Bus.pt: 'acura_rdx_2020_can_generated'}, flags=HondaFlags.BOSCH_ALT_BRAKE, From 7cb02e557e3967b0e34fce25de346e21c9d0ab1f Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 22 May 2025 07:42:57 -0400 Subject: [PATCH 23/88] added 25 camera fingerprint - only visible w comma power --- opendbc/car/honda/fingerprints.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 928b4eb0d57..b354eac2224 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -672,6 +672,7 @@ ], (Ecu.fwdCamera, 0x18dab5f1, None): [ b'36161-TJB-A040\x00\x00', + b'36161-TJB-A530\x00\x00', ], (Ecu.shiftByWire, 0x18da0bf1, None): [ b'54008-TJB-A520\x00\x00', From 5ad01edfa912ce7fcae2e0b60b52761cc67011c6 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 22 May 2025 07:48:44 -0400 Subject: [PATCH 24/88] oops - camera was already correct --- opendbc/car/honda/fingerprints.py | 1 - 1 file changed, 1 deletion(-) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index b354eac2224..928b4eb0d57 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -672,7 +672,6 @@ ], (Ecu.fwdCamera, 0x18dab5f1, None): [ b'36161-TJB-A040\x00\x00', - b'36161-TJB-A530\x00\x00', ], (Ecu.shiftByWire, 0x18da0bf1, None): [ b'54008-TJB-A520\x00\x00', From 72d75fe8d3d17c09e4d91d7c8cf60dfed4df83de Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 22 May 2025 07:57:02 -0400 Subject: [PATCH 25/88] adding 25 fingerprints only visible w comma power --- opendbc/car/honda/fingerprints.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 928b4eb0d57..64d76db0fcc 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -710,6 +710,7 @@ CAR.ACURA_RDX_3G_MMR: { (Ecu.vsa, 0x18da28f1, None): [ b'57114-TJB-A120\x00\x00', + b'57114-TJB-A210\x00\x00', ], (Ecu.fwdRadar, 0x18dab0f1, None): [ b'36802-TJB-A540\x00\x00', @@ -722,18 +723,23 @@ ], (Ecu.transmission, 0x18da1ef1, None): [ b'28102-5YK-A800\x00\x00', + b'28102-5YK-A910\x00\x00', ], (Ecu.srs, 0x18da53f1, None): [ b'77959-TJB-A120\x00\x00', + b'77959-TJB-A310\x00\x00', ], (Ecu.electricBrakeBooster, 0x18da2bf1, None): [ b'46114-TJB-A120\x00\x00', + b'46114-TJB-A220\x00\x00', ], (Ecu.gateway, 0x18daeff1, None): [ b'38897-TJB-A220\x00\x00', + b'38897-TJB-A310\x00\x00', ], (Ecu.eps, 0x18da30f1, None): [ b'39990-TJB-A070\x00\x00', + b'39990-TJB-A210\x00\x00', ], }, CAR.HONDA_RIDGELINE: { From a73170a3cd9270b9b3a39c6fb4afdc2b3e8e2f58 Mon Sep 17 00:00:00 2001 From: mvl Date: Sat, 31 May 2025 21:48:11 -0400 Subject: [PATCH 26/88] reverting 2168 baseline changes --- opendbc/car/honda/carstate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index b8ef7746781..7f92ac8e08b 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -67,7 +67,9 @@ def get_can_messages(CP, gearbox_msg): else: messages.append(("CRUISE_PARAMS", 50)) - if CP.carFingerprint == CAR.HONDA_CRV_5G or CP.carFingerprint not in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH): + if CP.carFingerprint not in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, + CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH_RADARLESS, + *HONDA_BOSCH_CANFD): messages.append(("DOORS_STATUS", 3)) if CP.carFingerprint in HONDA_BOSCH_RADARLESS: @@ -133,7 +135,8 @@ def update(self, can_parsers) -> structs.CarState: # panda checks if the signal is non-zero ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5 # TODO: find a common signal across all cars - if (self.CP.carFingerprint in HONDA_BOSCH) and not (self.CP.carFingerprint == CAR.HONDA_CRV_5G): + if self.CP.carFingerprint in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, + CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"]) elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV): ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"]) From 4878d0120060f60881d3f749c73ab02c0bcb5d20 Mon Sep 17 00:00:00 2001 From: mvl Date: Sat, 31 May 2025 21:50:01 -0400 Subject: [PATCH 27/88] Revert "CanFD value no longer needed" This reverts commit f5df1f90fc5db2427129bce1920cf40ccde41d2b. --- opendbc/car/honda/carstate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 7f92ac8e08b..cdbd1d302da 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -6,7 +6,8 @@ from opendbc.car import Bus, create_button_events, structs from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion -from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ +from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, \ + HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ HondaFlags, CruiseButtons, CruiseSettings, GearShifter from opendbc.car.interfaces import CarStateBase From 0d638b7afa3e490ea9bdeac064962e4d26a6005e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 31 May 2025 21:54:33 -0400 Subject: [PATCH 28/88] route comment cleanup --- opendbc/car/tests/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index 63f2b9de6fc..30c875ac444 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -103,7 +103,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("684e8f96bd491a0e|2021-11-03--11-08-42", HONDA.HONDA_PILOT), # Passport CarTestRoute("0a78dfbacc8504ef|2020-03-04--13-29-55", HONDA.HONDA_CIVIC_BOSCH), CarTestRoute("f34a60d68d83b1e5|2020-10-06--14-35-55", HONDA.ACURA_RDX), - CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), # todo: replace with newer route + CarTestRoute("0416c2843c0bfc91/0000001d--59c7744d87", HONDA.ACURA_RDX_3G_MMR), CarTestRoute("54fd8451b3974762|2021-04-01--14-50-10", HONDA.HONDA_RIDGELINE), CarTestRoute("2d5808fae0b38ac6|2021-09-01--17-14-11", HONDA.HONDA_E), CarTestRoute("f44aa96ace22f34a|2021-12-22--06-22-31", HONDA.HONDA_CIVIC_2022), From 70efd19da6aab0b44a7b69412d5a46a80691a4bd Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 31 May 2025 22:07:04 -0400 Subject: [PATCH 29/88] adding RDX_3G_MMR to door signals lists --- opendbc/car/honda/carstate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index aa99533bbdd..ae1c8e27f26 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -64,7 +64,7 @@ def get_can_messages(CP, gearbox_msg): ] if CP.carFingerprint not in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH_RADARLESS, + CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): messages.append(("DOORS_STATUS", 3)) @@ -132,7 +132,7 @@ def update(self, can_parsers) -> structs.CarState: ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5 # TODO: find a common signal across all cars if self.CP.carFingerprint in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): + CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"]) elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV): ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"]) From ef0b1e0e6a29be9ec6a32f282fadb60aa3d45d09 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 31 May 2025 22:09:11 -0400 Subject: [PATCH 30/88] fix for line length --- opendbc/car/honda/carstate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index ae1c8e27f26..5f18ab67cca 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -64,8 +64,8 @@ def get_can_messages(CP, gearbox_msg): ] if CP.carFingerprint not in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, *HONDA_BOSCH_RADARLESS, - *HONDA_BOSCH_CANFD): + CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, + *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): messages.append(("DOORS_STATUS", 3)) if CP.carFingerprint in HONDA_BOSCH_RADARLESS: From 9a399eeffecfc26b269161b45311f9095f555944 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 16 Jun 2025 21:13:41 -0400 Subject: [PATCH 31/88] Gas pedal tuning for RDX 3G MMR --- opendbc/car/honda/interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 4054be2c8c0..4335bcb3bdd 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -182,6 +182,8 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo else: ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] + if candidate == CAR.ACURA_RDX_3G_MMR: + CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] elif candidate in (CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN): ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] From 35047d53e9367033adc7be9bbfbf2654892bc465 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 17 Jun 2025 04:55:41 -0400 Subject: [PATCH 32/88] Updating max gas for RDX --- opendbc/safety/modes/honda.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/safety/modes/honda.h b/opendbc/safety/modes/honda.h index a702b2008b1..ab5f626ce57 100644 --- a/opendbc/safety/modes/honda.h +++ b/opendbc/safety/modes/honda.h @@ -171,7 +171,7 @@ static bool honda_tx_hook(const CANPacket_t *to_send) { .max_accel = 200, // accel is used for brakes .min_accel = -350, - .max_gas = 2000, + .max_gas = 2250, .inactive_gas = -30000, }; From 0e43a1a8820ba06113359da2cd6aee0416202420 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 17 Jun 2025 04:56:34 -0400 Subject: [PATCH 33/88] Gas pedal tuning for RDX 3G MMR --- opendbc/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 4335bcb3bdd..e5544b1d516 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -183,7 +183,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] if candidate == CAR.ACURA_RDX_3G_MMR: - CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] + CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2250] elif candidate in (CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN): ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] From 6aaae452e169da11db2f6976f11f334742162adb Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 17 Jun 2025 09:55:14 -0400 Subject: [PATCH 34/88] add 12kph minsteer for long on --- opendbc/car/honda/interface.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index e5544b1d516..c44fe967fc9 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -175,15 +175,19 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 1000], [0, 1000]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] - elif candidate in (CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR): - if (not ret.openpilotLongitudinalControl) and (candidate == CAR.ACURA_RDX_3G_MMR): + elif candidate == CAR.ACURA_RDX_3G: + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] + + elif candidate == CAR.ACURA_RDX_3G_MMR: + if ret.openpilotLongitudinalControl: + ret.minSteerSpeed = 12.0 * CV.KPH_TO_MS + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end + else: ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactivate. Used 70kph to clarify for warning message ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # clipped by radar - else: - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] - if candidate == CAR.ACURA_RDX_3G_MMR: - CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2250] + CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2250] elif candidate in (CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN): ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] From 3fd47e065968b513d8391e46005b6006c4fedee5 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 17 Jun 2025 10:04:51 -0400 Subject: [PATCH 35/88] set to 3840 to prevent faults --- opendbc/car/honda/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index c44fe967fc9..a3c9693b263 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -176,13 +176,13 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] elif candidate == CAR.ACURA_RDX_3G: - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] elif candidate == CAR.ACURA_RDX_3G_MMR: if ret.openpilotLongitudinalControl: ret.minSteerSpeed = 12.0 * CV.KPH_TO_MS - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] else: ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactivate. Used 70kph to clarify for warning message ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # clipped by radar From 26afe9322a19a2374784d68e3d5d0a3e484938ac Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 17 Jun 2025 10:14:34 -0400 Subject: [PATCH 36/88] try torqueV max alone without minsteer --- opendbc/car/honda/interface.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index a3c9693b263..de843afc39d 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -180,12 +180,9 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] elif candidate == CAR.ACURA_RDX_3G_MMR: - if ret.openpilotLongitudinalControl: - ret.minSteerSpeed = 12.0 * CV.KPH_TO_MS - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] - else: + if not (ret.openpilotLongitudinalControl): ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactivate. Used 70kph to clarify for warning message - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # clipped by radar + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2250] From 30649a2073d720ecb129b0a1a81049c11ea67599 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 00:54:02 -0400 Subject: [PATCH 37/88] Don't command steering if user is steering --- opendbc/car/honda/carcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 16255d542e3..fee4cabe490 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -159,8 +159,8 @@ def update(self, CC, CS, now_nanos): if self.frame % 10 == 0: can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True)) - # Send steering command. - can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive)) + # Send steering command. Only if not steeringPressed, otherwise some models will fault EPS. + can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive and not CS.out.steeringPressed)) # 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]) From e88ba37051193a87846be95d8bbdf65bf87d06e9 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 19:44:02 -0400 Subject: [PATCH 38/88] Creating BOSCH_ALT_CAMERA to share logic with 5G Odyssey --- opendbc/car/honda/values.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 87193c9e33c..504104ee859 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -70,6 +70,7 @@ class HondaFlags(IntFlag): NIDEC_ALT_SCM_MESSAGES = 64 BOSCH_CANFD = 128 + BOSCH_ALT_CAMERA = 256 # Car button codes class CruiseButtons: @@ -205,7 +206,7 @@ class CAR(Platforms): [HondaCarDocs("Acura RDX 2022-25", "All", min_steer_speed=70. * CV.KPH_TO_MS)], CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec {Bus.pt: 'acura_rdx_2020_can_generated'}, - flags=HondaFlags.BOSCH_ALT_BRAKE, + flags=HondaFlags.BOSCH_ALT_BRAKE | HondaFlags.BOSCH_ALT_CAMERA, ) HONDA_INSIGHT = HondaBoschPlatformConfig( [HondaCarDocs("Honda Insight 2019-22", "All", min_steer_speed=3. * CV.MPH_TO_MS)], @@ -370,6 +371,7 @@ class CAR(Platforms): HONDA_BOSCH = CAR.with_flags(HondaFlags.BOSCH) HONDA_BOSCH_RADARLESS = CAR.with_flags(HondaFlags.BOSCH_RADARLESS) HONDA_BOSCH_CANFD = CAR.with_flags(HondaFlags.BOSCH_CANFD) +HONDA_BOSCH_ALT_CAMERA = CAR.with_flags(HondaFlags.BOSCH_ALT_CAMERA) DBC = CAR.create_dbc_map() From c4c31056e5d90ba4896a0f59b937c94e14691bbe Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 19:45:21 -0400 Subject: [PATCH 39/88] referencing alt camera --- 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 fe5edea2e28..376569c2459 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -1,6 +1,6 @@ from opendbc.car import CanBusBase from opendbc.car.common.conversions import Conversions as CV -from opendbc.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_BOSCH_CANFD, CAR, CarControllerParams +from opendbc.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_CAMERA, CAR, CarControllerParams # CAN bus layout with relay # 0 = ACC-CAN - radar side @@ -47,7 +47,7 @@ def body(self) -> int: def get_cruise_speed_conversion(car_fingerprint: str, is_metric: bool) -> float: # on certain cars, CRUISE_SPEED changes to imperial with car's unit setting - return CV.MPH_TO_MS if car_fingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_CANFD | {CAR.ACURA_RDX_3G_MMR}) and not is_metric else CV.KPH_TO_MS + return CV.MPH_TO_MS if car_fingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_CANFD | HONDA_BOSCH_ALT_CAMERA) and not is_metric else CV.KPH_TO_MS def create_brake_command(packer, CAN, apply_brake, pump_on, pcm_override, pcm_cancel_cmd, fcw, car_fingerprint, stock_brake): From f157e9f60f042a1aa20829a0433ff7f9400f3479 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 19:50:03 -0400 Subject: [PATCH 40/88] reference HONDA_BOSCH_ALT_CAMERA --- opendbc/car/honda/carstate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 5f18ab67cca..7eeed067157 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -6,7 +6,7 @@ from opendbc.car import Bus, create_button_events, structs from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion -from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, \ +from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_CAMERA, \ HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ HondaFlags, CruiseButtons, CruiseSettings, GearShifter from opendbc.car.interfaces import CarStateBase @@ -64,8 +64,8 @@ def get_can_messages(CP, gearbox_msg): ] if CP.carFingerprint not in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, - *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): + CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, + *HONDA_BOSCH_ALT_CAMERA, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): messages.append(("DOORS_STATUS", 3)) if CP.carFingerprint in HONDA_BOSCH_RADARLESS: @@ -132,7 +132,7 @@ def update(self, can_parsers) -> structs.CarState: ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5 # TODO: find a common signal across all cars if self.CP.carFingerprint in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): + CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_ALT_CAMERA, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"]) elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV): ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"]) @@ -245,7 +245,7 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.available = bool(cp.vl[self.main_on_sig_msg]["MAIN_ON"]) # Adds low speed warning as some models disable cruise at various speeds, ignore warning under 3mph - if self.CP.carFingerprint == CAR.ACURA_RDX_3G_MMR: + if self.CP.carFingerprint in HONDA_BOSCH_ALT_CAMERA: ret.lowSpeedAlert = ret.cruiseState.enabled and ret.vEgo >= 4 * CV.MPH_TO_MS and \ cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 0 and not ret.steeringPressed From 3b029022124ce48cc7b00131584515334f3a1af6 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 19:52:22 -0400 Subject: [PATCH 41/88] switch to zero steer instead of steer disable --- opendbc/car/honda/carcontroller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index fee4cabe490..f5d125903f5 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -151,6 +151,10 @@ def update(self, CC, CS, now_nanos): apply_torque = int(np.interp(-limited_torque * self.params.STEER_MAX, self.params.STEER_LOOKUP_BP, self.params.STEER_LOOKUP_V)) + # alt_camera models fault if user and comma both apply torque + if CS.out.steeringPressed and self.CP.carFingerprint in (HONDA_BOSCH_ALT_CAMERA) + apply_torque = 0 + # Send CAN commands can_sends = [] @@ -160,7 +164,7 @@ def update(self, CC, CS, now_nanos): can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True)) # Send steering command. Only if not steeringPressed, otherwise some models will fault EPS. - can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive and not CS.out.steeringPressed)) + 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]) From 207a9e24a7e5aa3a88b24df1c011a03c338bf1b9 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 19:53:05 -0400 Subject: [PATCH 42/88] add alt camera import --- opendbc/car/honda/carcontroller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index f5d125903f5..d028c19e1ef 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -4,7 +4,8 @@ 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, HONDA_BOSCH_ALT_CAMERA from opendbc.car.interfaces import CarControllerBase VisualAlert = structs.CarControl.HUDControl.VisualAlert From d7998322022e21da28f00fbc3efac89f1d63a3dc Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 19:54:24 -0400 Subject: [PATCH 43/88] typo fixes --- opendbc/car/honda/carcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index d028c19e1ef..8322285f675 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -153,9 +153,9 @@ def update(self, CC, CS, now_nanos): self.params.STEER_LOOKUP_BP, self.params.STEER_LOOKUP_V)) # alt_camera models fault if user and comma both apply torque - if CS.out.steeringPressed and self.CP.carFingerprint in (HONDA_BOSCH_ALT_CAMERA) + if CS.out.steeringPressed and self.CP.carFingerprint in (HONDA_BOSCH_ALT_CAMERA): apply_torque = 0 - + # Send CAN commands can_sends = [] From f61a2d8896a922e63ba8fe478ec42bb7ac5f198d Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 20:06:34 -0400 Subject: [PATCH 44/88] remove comment --- 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 8322285f675..9c5d8bc63e6 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -164,7 +164,7 @@ def update(self, CC, CS, now_nanos): if self.frame % 10 == 0: can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True)) - # Send steering command. Only if not steeringPressed, otherwise some models will fault EPS. + # Send steering command can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive)) # wind brake from air resistance decel at high speed From 78be10b6a0a261cdacafb8ed25ec9665db7d6a79 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 20:07:47 -0400 Subject: [PATCH 45/88] properly revert comment change --- 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 9c5d8bc63e6..c9f6f60496e 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -164,7 +164,7 @@ def update(self, CC, CS, now_nanos): if self.frame % 10 == 0: can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True)) - # Send steering command + # Send steering command. can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive)) # wind brake from air resistance decel at high speed From 936990538063fca3281917f40d42e4be81ee1697 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 18 Jun 2025 20:22:28 -0400 Subject: [PATCH 46/88] give 30 second allowance for repeating steer warning - too obtrusive --- opendbc/car/honda/carstate.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 7eeed067157..f07d50fd307 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -3,7 +3,7 @@ from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from opendbc.car import Bus, create_button_events, structs +from opendbc.car import Bus, create_button_events, structs, DT_CTRL from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_CAMERA, \ @@ -100,6 +100,7 @@ def __init__(self, CP): self.brake_switch_active = False self.cruise_setting = 0 self.v_cruise_pcm_prev = 0 + self.last_steer = 0 # When available we use cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] to populate vEgoCluster # However, on cars without a digital speedometer this is not always present (HRV, FIT, CRV 2016, ILX and RDX) @@ -244,10 +245,12 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.enabled = cp.vl["POWERTRAIN_DATA"]["ACC_STATUS"] != 0 ret.cruiseState.available = bool(cp.vl[self.main_on_sig_msg]["MAIN_ON"]) - # Adds low speed warning as some models disable cruise at various speeds, ignore warning under 3mph + # Adds low speed warning ever 30 seconds as bosch_alt_camera models disable cruise under 70kph, ignore warning under 3mph if self.CP.carFingerprint in HONDA_BOSCH_ALT_CAMERA: - ret.lowSpeedAlert = ret.cruiseState.enabled and ret.vEgo >= 4 * CV.MPH_TO_MS and \ - cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 0 and not ret.steeringPressed + if ret.steeringPressed and ret.vEgo < 70 * CV.KPH_TO_MS: + self.last_steer = DT_CTRL + ret.lowSpeedAlert = ( DT_CTRL > self.last_steer + 3000 ) and ret.cruiseState.enabled and ret.vEgo >= 4 * CV.MPH_TO_MS and \ + cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 0 # Gets rid of Pedal Grinding noise when brake is pressed at slow speeds for some models if self.CP.carFingerprint in (CAR.HONDA_PILOT, CAR.HONDA_RIDGELINE): From 18c7a96cd4cfb13ab0e19688ab8d0c18511705d2 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Fri, 20 Jun 2025 01:03:00 -0400 Subject: [PATCH 47/88] adding gearbox to alt_camera --- opendbc/car/honda/carstate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index f07d50fd307..9606fca76f6 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -44,7 +44,7 @@ def get_can_messages(CP, gearbox_msg): ("SCM_BUTTONS", 25), ] - if CP.carFingerprint in (CAR.HONDA_CRV_HYBRID, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.ACURA_RDX_3G_MMR, CAR.HONDA_E): + if CP.carFingerprint in (CAR.HONDA_CRV_HYBRID, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_ALT_CAMERA): messages.append((gearbox_msg, 50)) else: messages.append((gearbox_msg, 100)) From 534c2cb5d2f605df9a770f2b80319699a1daadc9 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:19:56 -0400 Subject: [PATCH 48/88] change alt camera to alt radar --- 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 c9f6f60496e..6e67a3e66d8 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -5,7 +5,7 @@ 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, HONDA_BOSCH_ALT_CAMERA + CarControllerParams, HONDA_BOSCH_ALT_RADAR from opendbc.car.interfaces import CarControllerBase VisualAlert = structs.CarControl.HUDControl.VisualAlert From 16437acd1737c099c31875544ff3c07ca120c878 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:24:20 -0400 Subject: [PATCH 49/88] disable steer control when steering, and update display --- opendbc/car/honda/carcontroller.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 6e67a3e66d8..eacb0390a92 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -115,7 +115,8 @@ def __init__(self, dbc_names, CP): self.speed = 0.0 self.gas = 0.0 self.brake = 0.0 - self.last_torque = 0.0 + self.last_torque = 0.0 # last eps torque + self.steeringTorque_last = 0.0 # last driver torque def update(self, CC, CS, now_nanos): actuators = CC.actuators @@ -165,7 +166,14 @@ def update(self, CC, CS, now_nanos): can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True)) # Send steering command. - can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive)) + if self.CP.carFingerprint in (HONDA_BOSCH_ALT_RADAR): # faults when steer control occurs while steeringPressed + steerDisable = CS.out.steeringPressed or ( abs ( CS.out.steeringTorque - self.steeringTorque_last ) > 200 ) + self.steeringTorque_last = CS.out.steeringTorque + if steerDisable: + self.last_torque = 0 + else: + steerDisable = False + can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive and not steerDisable)) # 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]) @@ -233,8 +241,9 @@ def update(self, CC, CS, now_nanos): # Send dashboard UI commands. # On Nidec, this controls longitudinal positive acceleration if self.frame % 10 == 0: + display_lines = hud_control.lanesVisible and CS.show_lanelines and (abs(apply_torque) < self.params.STEER_MAX) hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), hud_control.leadVisible, - hud_control.lanesVisible, fcw_display, acc_alert, steer_required, hud_control.leadDistanceBars) + display_lines, fcw_display, acc_alert, steer_required, hud_control.leadDistanceBars) can_sends.extend(hondacan.create_ui_commands(self.packer, self.CAN, self.CP, CC.enabled, pcm_speed, hud, CS.is_metric, CS.acc_hud, CS.lkas_hud)) if self.CP.openpilotLongitudinalControl and self.CP.carFingerprint not in HONDA_BOSCH: From ecb40cb0f96068a0d2bbdc2ad64f61054494403c Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:28:01 -0400 Subject: [PATCH 50/88] Update lane line display --- opendbc/car/honda/carstate.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 9606fca76f6..4d383887e87 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -6,7 +6,7 @@ from opendbc.car import Bus, create_button_events, structs, DT_CTRL from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion -from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_CAMERA, \ +from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_RADAR, \ HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ HondaFlags, CruiseButtons, CruiseSettings, GearShifter from opendbc.car.interfaces import CarStateBase @@ -65,7 +65,7 @@ def get_can_messages(CP, gearbox_msg): if CP.carFingerprint not in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV, - *HONDA_BOSCH_ALT_CAMERA, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): + *HONDA_BOSCH_ALT_RADAR, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): messages.append(("DOORS_STATUS", 3)) if CP.carFingerprint in HONDA_BOSCH_RADARLESS: @@ -101,6 +101,7 @@ def __init__(self, CP): self.cruise_setting = 0 self.v_cruise_pcm_prev = 0 self.last_steer = 0 + self.show_lanelines = False # When available we use cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] to populate vEgoCluster # However, on cars without a digital speedometer this is not always present (HRV, FIT, CRV 2016, ILX and RDX) @@ -133,7 +134,7 @@ def update(self, can_parsers) -> structs.CarState: ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5 # TODO: find a common signal across all cars if self.CP.carFingerprint in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT, - CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_ALT_CAMERA, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): + CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_ALT_RADAR, *HONDA_BOSCH_RADARLESS, *HONDA_BOSCH_CANFD): ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"]) elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV): ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"]) @@ -245,12 +246,10 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.enabled = cp.vl["POWERTRAIN_DATA"]["ACC_STATUS"] != 0 ret.cruiseState.available = bool(cp.vl[self.main_on_sig_msg]["MAIN_ON"]) - # Adds low speed warning ever 30 seconds as bosch_alt_camera models disable cruise under 70kph, ignore warning under 3mph - if self.CP.carFingerprint in HONDA_BOSCH_ALT_CAMERA: - if ret.steeringPressed and ret.vEgo < 70 * CV.KPH_TO_MS: - self.last_steer = DT_CTRL - ret.lowSpeedAlert = ( DT_CTRL > self.last_steer + 3000 ) and ret.cruiseState.enabled and ret.vEgo >= 4 * CV.MPH_TO_MS and \ - cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 0 + if self.CP.carFingerprint in HONDA_BOSCH_ALT_RADAR: + self.show_lanelines = ret.cruiseState.enabled and cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 1 + else: + self.show_lanelines = True # Gets rid of Pedal Grinding noise when brake is pressed at slow speeds for some models if self.CP.carFingerprint in (CAR.HONDA_PILOT, CAR.HONDA_RIDGELINE): From d6e4cccd8a77bc571dcef64822947a12155516b3 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:37:08 -0400 Subject: [PATCH 51/88] update dashed lines and disable faults --- opendbc/car/honda/hondacan.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index 376569c2459..5e4dad7088e 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -1,6 +1,6 @@ from opendbc.car import CanBusBase from opendbc.car.common.conversions import Conversions as CV -from opendbc.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_CAMERA, CAR, CarControllerParams +from opendbc.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_RADAR, CAR, CarControllerParams # CAN bus layout with relay # 0 = ACC-CAN - radar side @@ -47,7 +47,7 @@ def body(self) -> int: def get_cruise_speed_conversion(car_fingerprint: str, is_metric: bool) -> float: # on certain cars, CRUISE_SPEED changes to imperial with car's unit setting - return CV.MPH_TO_MS if car_fingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_CANFD | HONDA_BOSCH_ALT_CAMERA) and not is_metric else CV.KPH_TO_MS + return CV.MPH_TO_MS if car_fingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_CANFD | HONDA_BOSCH_ALT_RADAR) and not is_metric else CV.KPH_TO_MS def create_brake_command(packer, CAN, apply_brake, pump_on, pcm_override, pcm_cancel_cmd, fcw, car_fingerprint, stock_brake): @@ -118,11 +118,13 @@ def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_count return commands -def create_steering_control(packer, CAN, apply_torque, lkas_active): +def create_steering_control(packer, CAN, apply_torque, lkas_active, fingerprint): values = { "STEER_TORQUE": apply_torque if lkas_active else 0, "STEER_TORQUE_REQUEST": lkas_active, } + if fingerprint in HONDA_BOSCH_ALT_RADAR: + values ['DISABLE_LOWSPEED_FAULT'] = lkas_active return packer.make_can_msg("STEERING_CONTROL", CAN.lkas, values) @@ -171,6 +173,7 @@ def create_ui_commands(packer, CAN, CP, enabled, pcm_speed, hud, is_metric, acc_ 'SET_ME_X41': 0x41, 'STEERING_REQUIRED': hud.steer_required, 'SOLID_LANES': hud.lanes_visible, + 'DASHED_LANES': int(enabled), 'BEEP': 0, } From f6e032176f2148f1f6a6e94498ada8f41c4a4da3 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:38:03 -0400 Subject: [PATCH 52/88] add fingerprint to steer control --- opendbc/car/honda/carcontroller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index eacb0390a92..14c50c40e42 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -173,7 +173,8 @@ def update(self, CC, CS, now_nanos): self.last_torque = 0 else: steerDisable = False - can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive and not steerDisable)) + can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive and not steerDisable, + self.CP.carFingerprint)) # 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]) From 0722dc60d3dac889d670947f4769c577e185ebdf Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:40:11 -0400 Subject: [PATCH 53/88] update steer threshold and minsteer speed --- opendbc/car/honda/values.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 504104ee859..97c1aeb5e7e 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -70,7 +70,7 @@ class HondaFlags(IntFlag): NIDEC_ALT_SCM_MESSAGES = 64 BOSCH_CANFD = 128 - BOSCH_ALT_CAMERA = 256 + BOSCH_ALT_RADAR = 256 # Car button codes class CruiseButtons: @@ -203,10 +203,10 @@ class CAR(Platforms): flags=HondaFlags.BOSCH_ALT_BRAKE, ) ACURA_RDX_3G_MMR = HondaBoschPlatformConfig( - [HondaCarDocs("Acura RDX 2022-25", "All", min_steer_speed=70. * CV.KPH_TO_MS)], + [HondaCarDocs("Acura RDX 2022-25", "All", min_steer_speed=45. * CV.MPH_TO_MS)], CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec {Bus.pt: 'acura_rdx_2020_can_generated'}, - flags=HondaFlags.BOSCH_ALT_BRAKE | HondaFlags.BOSCH_ALT_CAMERA, + flags=HondaFlags.BOSCH_ALT_BRAKE | HondaFlags.BOSCH_ALT_RADAR, ) HONDA_INSIGHT = HondaBoschPlatformConfig( [HondaCarDocs("Honda Insight 2019-22", "All", min_steer_speed=3. * CV.MPH_TO_MS)], @@ -363,6 +363,7 @@ class CAR(Platforms): STEER_THRESHOLD = { # default is 1200, overrides go here CAR.ACURA_RDX: 400, + CAR.ACURA_RDX_3G_MMR: 500, CAR.HONDA_CRV_EU: 400, } @@ -371,7 +372,7 @@ class CAR(Platforms): HONDA_BOSCH = CAR.with_flags(HondaFlags.BOSCH) HONDA_BOSCH_RADARLESS = CAR.with_flags(HondaFlags.BOSCH_RADARLESS) HONDA_BOSCH_CANFD = CAR.with_flags(HondaFlags.BOSCH_CANFD) -HONDA_BOSCH_ALT_CAMERA = CAR.with_flags(HondaFlags.BOSCH_ALT_CAMERA) +HONDA_BOSCH_ALT_RADAR = CAR.with_flags(HondaFlags.BOSCH_ALT_RADAR) DBC = CAR.create_dbc_map() From 657ea34f9bd81b248889111d168c1f310d3a3547 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:49:15 -0400 Subject: [PATCH 54/88] typo cleanup --- opendbc/car/honda/carstate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 4d383887e87..949bc94ac18 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -3,7 +3,7 @@ from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser -from opendbc.car import Bus, create_button_events, structs, DT_CTRL +from opendbc.car import Bus, create_button_events, structs from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_RADAR, \ @@ -44,7 +44,7 @@ def get_can_messages(CP, gearbox_msg): ("SCM_BUTTONS", 25), ] - if CP.carFingerprint in (CAR.HONDA_CRV_HYBRID, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_ALT_CAMERA): + if CP.carFingerprint in (CAR.HONDA_CRV_HYBRID, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.HONDA_E, *HONDA_BOSCH_ALT_RADAR): messages.append((gearbox_msg, 50)) else: messages.append((gearbox_msg, 100)) From 7100306673c790d273965c410a10e587afc0ac4e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:50:14 -0400 Subject: [PATCH 55/88] more cleanup --- opendbc/car/honda/carcontroller.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 14c50c40e42..b9c2cc09e1c 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -153,10 +153,6 @@ def update(self, CC, CS, now_nanos): apply_torque = int(np.interp(-limited_torque * self.params.STEER_MAX, self.params.STEER_LOOKUP_BP, self.params.STEER_LOOKUP_V)) - # alt_camera models fault if user and comma both apply torque - if CS.out.steeringPressed and self.CP.carFingerprint in (HONDA_BOSCH_ALT_CAMERA): - apply_torque = 0 - # Send CAN commands can_sends = [] From a9ab3e8026af17343124b9165892721a3b600d8b Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 20:51:40 -0400 Subject: [PATCH 56/88] remove duplicate minspeed, update gas max --- opendbc/car/honda/interface.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index de843afc39d..ece7b7e636d 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -180,11 +180,9 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] elif candidate == CAR.ACURA_RDX_3G_MMR: - if not (ret.openpilotLongitudinalControl): - ret.minSteerSpeed = 70.0 * CV.KPH_TO_MS # min is 70kph to activate but 60kph to deactivate. Used 70kph to clarify for warning message ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] - CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2250] + CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] elif candidate in (CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN): ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] From 2168e924c80b661f32290ad1d3db8102923d7c10 Mon Sep 17 00:00:00 2001 From: mvl Date: Mon, 23 Jun 2025 20:57:12 -0400 Subject: [PATCH 57/88] Revert safety changes in "Updating max gas for RDX" This reverts commit 35047d53e9367033adc7be9bbfbf2654892bc465. --- opendbc/safety/modes/honda.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/safety/modes/honda.h b/opendbc/safety/modes/honda.h index ab5f626ce57..a702b2008b1 100644 --- a/opendbc/safety/modes/honda.h +++ b/opendbc/safety/modes/honda.h @@ -171,7 +171,7 @@ static bool honda_tx_hook(const CANPacket_t *to_send) { .max_accel = 200, // accel is used for brakes .min_accel = -350, - .max_gas = 2250, + .max_gas = 2000, .inactive_gas = -30000, }; From 161ca758d8e0121f099a66bea419ce62d00c5bb4 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 21:01:05 -0400 Subject: [PATCH 58/88] 3810 steer max to prevent faults --- opendbc/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index ece7b7e636d..9dc2262529b 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -180,7 +180,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] elif candidate == CAR.ACURA_RDX_3G_MMR: - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3810], [0, 3810]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] From f5277f217d1ebbd7418a4a4acd203c4f62d81f1f Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Mon, 23 Jun 2025 22:19:20 -0400 Subject: [PATCH 59/88] update lowspeed fault signal name --- opendbc/dbc/generator/honda/_bosch_2018.dbc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/dbc/generator/honda/_bosch_2018.dbc b/opendbc/dbc/generator/honda/_bosch_2018.dbc index 9da5c1e030f..81b0bbd140c 100644 --- a/opendbc/dbc/generator/honda/_bosch_2018.dbc +++ b/opendbc/dbc/generator/honda/_bosch_2018.dbc @@ -9,7 +9,7 @@ BO_ 228 STEERING_CONTROL: 5 EON SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS SG_ SET_ME_X00_2 : 31|8@0+ (1,0) [0|0] "" EPS SG_ STEER_TORQUE : 7|16@0- (1,0) [-4096|4096] "" EPS - SG_ STEER_DOWN_TO_ZERO : 38|1@0+ (1,0) [0|1] "" EPS + SG_ DISABLE_LOWSPEED_FAULT : 38|1@0+ (1,0) [0|1] "" EPS SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" EPS SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" EPS From 33ce43a2a8512b9304fbae56b1cc5cd2fd04f8ca Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 25 Jun 2025 10:47:57 -0400 Subject: [PATCH 60/88] add driver steering message --- opendbc/car/honda/carstate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 949bc94ac18..3a1a0691bd6 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -144,10 +144,10 @@ def update(self, can_parsers) -> structs.CarState: ret.seatbeltUnlatched = bool(cp.vl["SEATBELT_STATUS"]["SEATBELT_DRIVER_LAMP"] or not cp.vl["SEATBELT_STATUS"]["SEATBELT_DRIVER_LATCHED"]) steer_status = self.steer_status_values[cp.vl["STEER_STATUS"]["STEER_STATUS"]] - ret.steerFaultPermanent = steer_status not in ("NORMAL", "NO_TORQUE_ALERT_1", "NO_TORQUE_ALERT_2", "LOW_SPEED_LOCKOUT", "TMP_FAULT") + ret.steerFaultPermanent = steer_status not in ("NORMAL", "NO_TORQUE_ALERT_1", "NO_TORQUE_ALERT_2", "LOW_SPEED_LOCKOUT", "TMP_FAULT", "DRIVER_STEERING") # LOW_SPEED_LOCKOUT is not worth a warning # NO_TORQUE_ALERT_2 can be caused by bump or steering nudge from driver - ret.steerFaultTemporary = steer_status not in ("NORMAL", "LOW_SPEED_LOCKOUT", "NO_TORQUE_ALERT_2") + ret.steerFaultTemporary = steer_status not in ("NORMAL", "LOW_SPEED_LOCKOUT", "NO_TORQUE_ALERT_2", "DRIVER_STEERING") if self.CP.carFingerprint in HONDA_BOSCH_RADARLESS: ret.accFaulted = bool(cp.vl["CRUISE_FAULT_STATUS"]["CRUISE_FAULT"]) From c4a1272d7c86fe1d38b9b839ce1240b677ce6a3a Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 25 Jun 2025 10:48:44 -0400 Subject: [PATCH 61/88] add driver steering message --- opendbc/dbc/generator/honda/_bosch_2018.dbc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/dbc/generator/honda/_bosch_2018.dbc b/opendbc/dbc/generator/honda/_bosch_2018.dbc index 81b0bbd140c..7bd1ac4d093 100644 --- a/opendbc/dbc/generator/honda/_bosch_2018.dbc +++ b/opendbc/dbc/generator/honda/_bosch_2018.dbc @@ -216,6 +216,6 @@ CM_ SG_ 577 LINE_PARAMETER "Unclear if this is low quality line curvature rate o CM_ SG_ 577 LINE_DASHED "1 = line is dashed"; CM_ SG_ 577 LINE_SOLID "1 = line is solid"; -VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal"; +VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 1 "driver_steering" 0 "normal"; VAL_ 862 SPEED_LIMIT_SIGN 97 "SPEED_LIMIT_5" 98 "SPEED_LIMIT_10" 99 "SPEED_LIMIT_15" 100 "SPEED_LIMIT_20" 101 "SPEED_LIMIT_25" 102 "SPEED_LIMIT_30" 103 "SPEED_LIMIT_35" 104 "SPEED_LIMIT_40" 105 "SPEED_LIMIT_45" 106 "SPEED_LIMIT_50" 107 "SPEED_LIMIT_55" 108 "SPEED_LIMIT_60" 109 "SPEED_LIMIT_65" 110 "SPEED_LIMIT_70" 111 "SPEED_LIMIT_75" 112 "SPEED_LIMIT_80" 113 "SPEED_LIMIT_85" 125 "SPEED_LIMIT_NA" 0 "STOP_SIGN"; VAL_ 862 ROAD_SIGN 0 "NO_SIGN" 89 "STOP_SIGN"; From 221e6e437e037e85df761cd5983c7c64c017a33d Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 25 Jun 2025 12:16:28 -0400 Subject: [PATCH 62/88] block lkas forward --- opendbc/safety/modes/honda.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/opendbc/safety/modes/honda.h b/opendbc/safety/modes/honda.h index a702b2008b1..5ba0c4ffb9a 100644 --- a/opendbc/safety/modes/honda.h +++ b/opendbc/safety/modes/honda.h @@ -412,6 +412,17 @@ static bool honda_nidec_fwd_hook(int bus_num, int addr) { return block_msg; } +static bool honda_bosch_fwd_hook(int bus_num, int addr) { + bool block_msg = false; + + if (bus_num == 2) { + bool is_lkas_msg = (addr == 0xE4) || (addr == 0xE5) || (addr == 0x33D) || (addr == 0x33DA) || (addr == 0x33DB); + block_msg = is_lkas_msg && !honda_bosch_radarless; + } + + return block_msg; +} + const safety_hooks honda_nidec_hooks = { .init = honda_nidec_init, .rx = honda_rx_hook, @@ -426,6 +437,7 @@ const safety_hooks honda_bosch_hooks = { .init = honda_bosch_init, .rx = honda_rx_hook, .tx = honda_tx_hook, + .fwd = honda_bosch_fwd_hook, .get_counter = honda_get_counter, .get_checksum = honda_get_checksum, .compute_checksum = honda_compute_checksum, From 3f5d7b5edfa46b7fa320979db35bc432f942483c Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 25 Jun 2025 12:19:17 -0400 Subject: [PATCH 63/88] Updating test for LKAS fwd block --- opendbc/safety/tests/test_honda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/safety/tests/test_honda.py b/opendbc/safety/tests/test_honda.py index 181bdbe782a..21c837128cc 100755 --- a/opendbc/safety/tests/test_honda.py +++ b/opendbc/safety/tests/test_honda.py @@ -453,7 +453,7 @@ class TestHondaBoschLongSafety(HondaButtonEnableBase, TestHondaBoschSafetyBase): STEER_BUS = 1 TX_MSGS = [[0xE4, 1], [0x1DF, 1], [0x1EF, 1], [0x1FA, 1], [0x30C, 1], [0x33D, 1], [0x33DA, 1], [0x33DB, 1], [0x39F, 1], [0x18DAB0F1, 1]] - FWD_BLACKLISTED_ADDRS = {} + FWD_BLACKLISTED_ADDRS = {2: [0xE4, 0xE5, 0x33D, 0x33DA, 0x33DB]} # 0x1DF is to test that radar is disabled RELAY_MALFUNCTION_ADDRS = {1: (0xE4, 0x1DF, 0x33D, 0x33DA, 0x33DB)} # STEERING_CONTROL, ACC_CONTROL From af48ff079f36f43259002412be7b2b397a341f40 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 5 Jul 2025 22:40:58 -0400 Subject: [PATCH 64/88] updating steer disable to longcontrol only based on driver feedback --- 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 b9c2cc09e1c..9f7140acf4b 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -163,7 +163,7 @@ def update(self, CC, CS, now_nanos): # Send steering command. if self.CP.carFingerprint in (HONDA_BOSCH_ALT_RADAR): # faults when steer control occurs while steeringPressed - steerDisable = CS.out.steeringPressed or ( abs ( CS.out.steeringTorque - self.steeringTorque_last ) > 200 ) + steerDisable = CC.longActive and (CS.out.steeringPressed or ( abs ( CS.out.steeringTorque - self.steeringTorque_last ) > 200 )) self.steeringTorque_last = CS.out.steeringTorque if steerDisable: self.last_torque = 0 From 4b02988884b557d7e9c0a02d10fd54296c637fcb Mon Sep 17 00:00:00 2001 From: mvl Date: Tue, 15 Jul 2025 23:47:33 -0400 Subject: [PATCH 65/88] Revert "adding 25 fingerprints only visible w comma power" This reverts commit 72d75fe8d3d17c09e4d91d7c8cf60dfed4df83de. --- opendbc/car/honda/fingerprints.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 3ec89bfbe02..fb35ec392fe 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -718,7 +718,6 @@ CAR.ACURA_RDX_3G_MMR: { (Ecu.vsa, 0x18da28f1, None): [ b'57114-TJB-A120\x00\x00', - b'57114-TJB-A210\x00\x00', ], (Ecu.fwdRadar, 0x18dab0f1, None): [ b'36802-TJB-A540\x00\x00', @@ -731,23 +730,18 @@ ], (Ecu.transmission, 0x18da1ef1, None): [ b'28102-5YK-A800\x00\x00', - b'28102-5YK-A910\x00\x00', ], (Ecu.srs, 0x18da53f1, None): [ b'77959-TJB-A120\x00\x00', - b'77959-TJB-A310\x00\x00', ], (Ecu.electricBrakeBooster, 0x18da2bf1, None): [ b'46114-TJB-A120\x00\x00', - b'46114-TJB-A220\x00\x00', ], (Ecu.gateway, 0x18daeff1, None): [ b'38897-TJB-A220\x00\x00', - b'38897-TJB-A310\x00\x00', ], (Ecu.eps, 0x18da30f1, None): [ b'39990-TJB-A070\x00\x00', - b'39990-TJB-A210\x00\x00', ], }, CAR.HONDA_RIDGELINE: { From 9226b1e031a1edb579d349c08649b2210397fa88 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 15 Jul 2025 23:53:19 -0400 Subject: [PATCH 66/88] Aligning with odyssey changes --- opendbc/car/honda/carcontroller.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 9f7140acf4b..e3a4e22c1ca 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -4,8 +4,7 @@ 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, HONDA_BOSCH_ALT_RADAR +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 VisualAlert = structs.CarControl.HUDControl.VisualAlert @@ -115,8 +114,8 @@ def __init__(self, dbc_names, CP): self.speed = 0.0 self.gas = 0.0 self.brake = 0.0 - self.last_torque = 0.0 # last eps torque - self.steeringTorque_last = 0.0 # last driver torque + self.last_torque = 0.0 + self.steer_restricted = False def update(self, CC, CS, now_nanos): actuators = CC.actuators @@ -152,6 +151,7 @@ def update(self, CC, CS, now_nanos): # steer torque is converted back to CAN reference (positive when steering right) apply_torque = int(np.interp(-limited_torque * self.params.STEER_MAX, self.params.STEER_LOOKUP_BP, self.params.STEER_LOOKUP_V)) + self.steer_restricted = (abs(apply_torque) == self.params.STEER_MAX) or CS.steering_blocked # for hud lane line display # Send CAN commands can_sends = [] @@ -162,15 +162,7 @@ def update(self, CC, CS, now_nanos): can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True)) # Send steering command. - if self.CP.carFingerprint in (HONDA_BOSCH_ALT_RADAR): # faults when steer control occurs while steeringPressed - steerDisable = CC.longActive and (CS.out.steeringPressed or ( abs ( CS.out.steeringTorque - self.steeringTorque_last ) > 200 )) - self.steeringTorque_last = CS.out.steeringTorque - if steerDisable: - self.last_torque = 0 - else: - steerDisable = False - can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive and not steerDisable, - self.CP.carFingerprint)) + 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]) @@ -238,10 +230,10 @@ def update(self, CC, CS, now_nanos): # Send dashboard UI commands. # On Nidec, this controls longitudinal positive acceleration if self.frame % 10 == 0: - display_lines = hud_control.lanesVisible and CS.show_lanelines and (abs(apply_torque) < self.params.STEER_MAX) hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), hud_control.leadVisible, - display_lines, fcw_display, acc_alert, steer_required, hud_control.leadDistanceBars) - can_sends.extend(hondacan.create_ui_commands(self.packer, self.CAN, self.CP, CC.enabled, pcm_speed, hud, CS.is_metric, CS.acc_hud, CS.lkas_hud)) + hud_control.lanesVisible, fcw_display, acc_alert, steer_required, hud_control.leadDistanceBars) + can_sends.extend(hondacan.create_ui_commands(self.packer, self.CAN, self.CP, CC.enabled, pcm_speed, hud, CS.is_metric, CS.acc_hud, CS.lkas_hud, + self.steer_restricted)) if self.CP.openpilotLongitudinalControl and self.CP.carFingerprint not in HONDA_BOSCH: self.speed = pcm_speed From a1acc91ee1fda391d173267e15ac00a0c5c79fcb Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 15 Jul 2025 23:54:13 -0400 Subject: [PATCH 67/88] aligning with odyssey carstate changes --- opendbc/car/honda/carstate.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 5a13d0d3ed2..d4523ed49e8 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -6,7 +6,7 @@ from opendbc.car import Bus, create_button_events, structs from opendbc.car.common.conversions import Conversions as CV from opendbc.car.honda.hondacan import CanBus, get_cruise_speed_conversion -from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_CANFD, HONDA_BOSCH_ALT_RADAR, \ +from opendbc.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_BOSCH_ALT_RADAR,\ HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS, \ HondaFlags, CruiseButtons, CruiseSettings, GearShifter from opendbc.car.interfaces import CarStateBase @@ -88,8 +88,7 @@ def __init__(self, CP): self.brake_switch_active = False self.cruise_setting = 0 self.v_cruise_pcm_prev = 0 - self.last_steer = 0 - self.show_lanelines = False + self.steering_blocked = False # When available we use cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] to populate vEgoCluster # However, on cars without a digital speedometer this is not always present (HRV, FIT, CRV 2016, ILX and RDX) @@ -236,9 +235,7 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.available = bool(cp.vl[self.main_on_sig_msg]["MAIN_ON"]) if self.CP.carFingerprint in HONDA_BOSCH_ALT_RADAR: - self.show_lanelines = ret.cruiseState.enabled and cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] == 1 - else: - self.show_lanelines = True + self.steering_blocked = cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] != 1 # Gets rid of Pedal Grinding noise when brake is pressed at slow speeds for some models if self.CP.carFingerprint in (CAR.HONDA_PILOT, CAR.HONDA_RIDGELINE): From c383298ee0e693cfb413dcfce8dd85337acf1688 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 15 Jul 2025 23:55:43 -0400 Subject: [PATCH 68/88] aligning with odyssey hondacan changes --- opendbc/car/honda/hondacan.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/opendbc/car/honda/hondacan.py b/opendbc/car/honda/hondacan.py index 5e4dad7088e..38f006ce6ad 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -118,13 +118,11 @@ def create_acc_commands(packer, CAN, enabled, active, accel, gas, stopping_count return commands -def create_steering_control(packer, CAN, apply_torque, lkas_active, fingerprint): +def create_steering_control(packer, CAN, apply_torque, lkas_active): values = { "STEER_TORQUE": apply_torque if lkas_active else 0, "STEER_TORQUE_REQUEST": lkas_active, } - if fingerprint in HONDA_BOSCH_ALT_RADAR: - values ['DISABLE_LOWSPEED_FAULT'] = lkas_active return packer.make_can_msg("STEERING_CONTROL", CAN.lkas, values) @@ -138,7 +136,7 @@ def create_bosch_supplemental_1(packer, CAN): return packer.make_can_msg("BOSCH_SUPPLEMENTAL_1", CAN.lkas, values) -def create_ui_commands(packer, CAN, CP, enabled, pcm_speed, hud, is_metric, acc_hud, lkas_hud): +def create_ui_commands(packer, CAN, CP, enabled, pcm_speed, hud, is_metric, acc_hud, lkas_hud, steer_restricted): commands = [] radar_disabled = CP.carFingerprint in (HONDA_BOSCH - HONDA_BOSCH_RADARLESS) and CP.openpilotLongitudinalControl @@ -172,7 +170,7 @@ def create_ui_commands(packer, CAN, CP, enabled, pcm_speed, hud, is_metric, acc_ lkas_hud_values = { 'SET_ME_X41': 0x41, 'STEERING_REQUIRED': hud.steer_required, - 'SOLID_LANES': hud.lanes_visible, + 'SOLID_LANES': hud.lanes_visible and not steer_restricted, 'DASHED_LANES': int(enabled), 'BEEP': 0, } From 10d73e1970dab8030f6881f64138e5e92b3408d8 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 15 Jul 2025 23:57:54 -0400 Subject: [PATCH 69/88] aligning with odysey values changes --- opendbc/car/honda/values.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 8ae1bdb5036..a2a25d9e085 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -70,7 +70,7 @@ class HondaFlags(IntFlag): NIDEC_ALT_SCM_MESSAGES = 64 BOSCH_CANFD = 128 - BOSCH_ALT_RADAR = 256 + BOSCH_ALT_RADAR = 512 HAS_ALL_DOOR_STATES = 256 # Some Hondas have all door states, others only driver door HAS_EPB = 512 @@ -361,7 +361,6 @@ class CAR(Platforms): STEER_THRESHOLD = { # default is 1200, overrides go here CAR.ACURA_RDX: 400, - CAR.ACURA_RDX_3G_MMR: 500, CAR.HONDA_CRV_EU: 400, } From 021872aeabaa45245d0be59a61f379b4f1bf2575 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Tue, 15 Jul 2025 23:59:29 -0400 Subject: [PATCH 70/88] aligning with odyssey bosch2018 dbc changes --- opendbc/dbc/generator/honda/_bosch_2018.dbc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/dbc/generator/honda/_bosch_2018.dbc b/opendbc/dbc/generator/honda/_bosch_2018.dbc index a16b9fa9b51..f408d59df52 100644 --- a/opendbc/dbc/generator/honda/_bosch_2018.dbc +++ b/opendbc/dbc/generator/honda/_bosch_2018.dbc @@ -9,7 +9,7 @@ BO_ 228 STEERING_CONTROL: 5 EON SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS SG_ SET_ME_X00_2 : 31|8@0+ (1,0) [0|0] "" EPS SG_ STEER_TORQUE : 7|16@0- (1,0) [-4096|4096] "" EPS - SG_ DISABLE_LOWSPEED_FAULT : 38|1@0+ (1,0) [0|1] "" EPS + SG_ STEER_DOWN_TO_ZERO : 38|1@0+ (1,0) [0|1] "" EPS SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" EPS SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" EPS @@ -209,6 +209,6 @@ CM_ SG_ 577 LINE_PARAMETER "Unclear if this is low quality line curvature rate o CM_ SG_ 577 LINE_DASHED "1 = line is dashed"; CM_ SG_ 577 LINE_SOLID "1 = line is solid"; -VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 1 "driver_steering" 0 "normal"; +VAL_ 399 STEER_STATUS 7 "permanent_fault" 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 1 "driver_steering" 0 "normal"; VAL_ 862 SPEED_LIMIT_SIGN 97 "SPEED_LIMIT_5" 98 "SPEED_LIMIT_10" 99 "SPEED_LIMIT_15" 100 "SPEED_LIMIT_20" 101 "SPEED_LIMIT_25" 102 "SPEED_LIMIT_30" 103 "SPEED_LIMIT_35" 104 "SPEED_LIMIT_40" 105 "SPEED_LIMIT_45" 106 "SPEED_LIMIT_50" 107 "SPEED_LIMIT_55" 108 "SPEED_LIMIT_60" 109 "SPEED_LIMIT_65" 110 "SPEED_LIMIT_70" 111 "SPEED_LIMIT_75" 112 "SPEED_LIMIT_80" 113 "SPEED_LIMIT_85" 125 "SPEED_LIMIT_NA" 0 "STOP_SIGN"; VAL_ 862 ROAD_SIGN 0 "NO_SIGN" 89 "STOP_SIGN"; From 170a8f84121b9de5cefb879ca41ff25695481b05 Mon Sep 17 00:00:00 2001 From: mvl Date: Wed, 16 Jul 2025 00:01:08 -0400 Subject: [PATCH 71/88] Revert "block lkas forward" safety change, only impacts 2025 This reverts commit 221e6e437e037e85df761cd5983c7c64c017a33d. --- opendbc/safety/modes/honda.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/opendbc/safety/modes/honda.h b/opendbc/safety/modes/honda.h index 5ba0c4ffb9a..a702b2008b1 100644 --- a/opendbc/safety/modes/honda.h +++ b/opendbc/safety/modes/honda.h @@ -412,17 +412,6 @@ static bool honda_nidec_fwd_hook(int bus_num, int addr) { return block_msg; } -static bool honda_bosch_fwd_hook(int bus_num, int addr) { - bool block_msg = false; - - if (bus_num == 2) { - bool is_lkas_msg = (addr == 0xE4) || (addr == 0xE5) || (addr == 0x33D) || (addr == 0x33DA) || (addr == 0x33DB); - block_msg = is_lkas_msg && !honda_bosch_radarless; - } - - return block_msg; -} - const safety_hooks honda_nidec_hooks = { .init = honda_nidec_init, .rx = honda_rx_hook, @@ -437,7 +426,6 @@ const safety_hooks honda_bosch_hooks = { .init = honda_bosch_init, .rx = honda_rx_hook, .tx = honda_tx_hook, - .fwd = honda_bosch_fwd_hook, .get_counter = honda_get_counter, .get_checksum = honda_get_checksum, .compute_checksum = honda_compute_checksum, From bcb7f12d0dc558e09fb0270ff2bde0f849f0ff17 Mon Sep 17 00:00:00 2001 From: mvl Date: Wed, 16 Jul 2025 00:02:52 -0400 Subject: [PATCH 72/88] Revert "Updating test for LKAS fwd block" safety change, only impacts 2025 This reverts commit 3f5d7b5edfa46b7fa320979db35bc432f942483c. --- opendbc/safety/tests/test_honda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/safety/tests/test_honda.py b/opendbc/safety/tests/test_honda.py index 21c837128cc..181bdbe782a 100755 --- a/opendbc/safety/tests/test_honda.py +++ b/opendbc/safety/tests/test_honda.py @@ -453,7 +453,7 @@ class TestHondaBoschLongSafety(HondaButtonEnableBase, TestHondaBoschSafetyBase): STEER_BUS = 1 TX_MSGS = [[0xE4, 1], [0x1DF, 1], [0x1EF, 1], [0x1FA, 1], [0x30C, 1], [0x33D, 1], [0x33DA, 1], [0x33DB, 1], [0x39F, 1], [0x18DAB0F1, 1]] - FWD_BLACKLISTED_ADDRS = {2: [0xE4, 0xE5, 0x33D, 0x33DA, 0x33DB]} + FWD_BLACKLISTED_ADDRS = {} # 0x1DF is to test that radar is disabled RELAY_MALFUNCTION_ADDRS = {1: (0xE4, 0x1DF, 0x33D, 0x33DA, 0x33DB)} # STEERING_CONTROL, ACC_CONTROL From 748213bc09f34279d40ae7d7c96c3f4e8e5c3a2e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 16 Jul 2025 00:04:26 -0400 Subject: [PATCH 73/88] update compatible years to only 2024 --- opendbc/car/honda/values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index a2a25d9e085..0c75047e190 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -206,7 +206,7 @@ class CAR(Platforms): flags=HondaFlags.BOSCH_ALT_BRAKE, ) ACURA_RDX_3G_MMR = HondaBoschPlatformConfig( - [HondaCarDocs("Acura RDX 2022-25", "All", min_steer_speed=45. * CV.MPH_TO_MS)], + [HondaCarDocs("Acura RDX 2022-24", "All", min_steer_speed=45. * CV.MPH_TO_MS)], CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec {Bus.pt: 'acura_rdx_2020_can_generated'}, flags=HondaFlags.BOSCH_ALT_BRAKE | HondaFlags.BOSCH_ALT_RADAR, From 0ba03e3ed39a25c340c06d6888da7665669c986e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 13 Aug 2025 10:37:06 -0400 Subject: [PATCH 74/88] Reducing community support to 2025 only --- opendbc/car/extra_cars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/extra_cars.py b/opendbc/car/extra_cars.py index a2df965e375..5787c05474b 100644 --- a/opendbc/car/extra_cars.py +++ b/opendbc/car/extra_cars.py @@ -41,7 +41,7 @@ class CAR(Platforms): CommunityCarDocs("Acura MDX 2015-16", "Advance Package"), CommunityCarDocs("Acura MDX 2017-20", "All"), CommunityCarDocs("Acura MDX 2025", "All"), - CommunityCarDocs("Acura RDX 2022-25", "All"), + CommunityCarDocs("Acura RDX 2025", "All"), CommunityCarDocs("Acura RLX 2017", "Advance Package or Technology Package"), CommunityCarDocs("Acura TLX 2015-17", "Advance Package"), CommunityCarDocs("Acura TLX 2018-20", "All"), From 6e1d70beb1c3855459f4cf5be11851795b11bc24 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Wed, 27 Aug 2025 22:07:24 -0400 Subject: [PATCH 75/88] remove RDX from community list --- opendbc/car/CARS_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/opendbc/car/CARS_template.md b/opendbc/car/CARS_template.md index fb9dc1673d4..549756c355a 100644 --- a/opendbc/car/CARS_template.md +++ b/opendbc/car/CARS_template.md @@ -48,7 +48,6 @@ Supported Models' section of each make [on our wiki](https://wiki.comma.ai/). Some notable works-in-progress: * Honda * 2025 Acura MDX (CAN-FD), commaai/opendbc#2129 - * 2022-25 Acura RDX, commaai/opendbc#1967 * 2021-25 Honda Odyssey, commaai/opendbc#2170 * Camera ACC stability improvements, commaai/opendbc#2192 * Alpha longitudinal stability improvements, commaai/opendbc#2347 and commaai/opendbc#2165 From 773990063b5d5fd57b1a261dd84c18bb87db533d Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 6 Sep 2025 17:26:43 -0400 Subject: [PATCH 76/88] remove parentheses change --- 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 4937f0f9aef..25ed7271bdd 100644 --- a/opendbc/car/honda/hondacan.py +++ b/opendbc/car/honda/hondacan.py @@ -1,6 +1,6 @@ from opendbc.car import CanBusBase from opendbc.car.common.conversions import Conversions as CV -from opendbc.car.honda.values import (HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_BOSCH_CANFD, CAR, CarControllerParams) +from opendbc.car.honda.values import HondaFlags, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_BOSCH_CANFD, CAR, CarControllerParams # CAN bus layout with relay # 0 = ACC-CAN - radar side From aaa039685c82db9d03b0fa4d961fb22b4f252e7b Mon Sep 17 00:00:00 2001 From: Jason Young Date: Sat, 6 Sep 2025 15:59:16 -0400 Subject: [PATCH 77/88] repack flags --- opendbc/car/honda/values.py | 1 - 1 file changed, 1 deletion(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 6989ec46070..bc7a6c0eed3 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -72,7 +72,6 @@ class HondaFlags(IntFlag): NIDEC_ALT_SCM_MESSAGES = 64 BOSCH_CANFD = 128 - BOSCH_ALT_RADAR = 2048 HAS_ALL_DOOR_STATES = 256 # Some Hondas have all door states, others only driver door BOSCH_ALT_RADAR = 512 From ee0d9f5dde08fde80e8bc9a4a7b6be9978e25076 Mon Sep 17 00:00:00 2001 From: mvl Date: Sat, 6 Sep 2025 17:41:51 -0400 Subject: [PATCH 78/88] Revert "aligning with odyssey bosch2018 dbc changes" - only impacted 2025 RDX which was removed from this PR This reverts commit 021872aeabaa45245d0be59a61f379b4f1bf2575. --- opendbc/dbc/generator/honda/_bosch_2018.dbc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/dbc/generator/honda/_bosch_2018.dbc b/opendbc/dbc/generator/honda/_bosch_2018.dbc index 4f3a3f9cb96..201e6f0fd34 100644 --- a/opendbc/dbc/generator/honda/_bosch_2018.dbc +++ b/opendbc/dbc/generator/honda/_bosch_2018.dbc @@ -216,7 +216,7 @@ CM_ SG_ 577 LINE_PARAMETER "Unclear if this is low quality line curvature rate o CM_ SG_ 577 LINE_DASHED "1 = line is dashed"; CM_ SG_ 577 LINE_SOLID "1 = line is solid"; -VAL_ 399 STEER_STATUS 7 "permanent_fault" 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 1 "driver_steering" 0 "normal"; +VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal"; VAL_ 662 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ; VAL_ 662 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ; VAL_ 806 CMBS_STATES 3 "pressed" 0 "released" ; From b8c1b04b81d149ceea3c01b88afe13c99c8cdefc Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 6 Sep 2025 19:49:37 -0400 Subject: [PATCH 79/88] moving to torque tuning based on log --- opendbc/car/honda/interface.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 6d130dd05e0..697c351d13b 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -155,11 +155,6 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # TODO: determine if there is a dead zone at the top end ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] - elif candidate == CAR.ACURA_RDX_3G_MMR: - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3810], [0, 3810]] - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] - CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] - elif candidate == CAR.HONDA_ODYSSEY: ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end @@ -185,6 +180,9 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]] CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) + elif candidate == CAR.ACURA_RDX_3G_MMR: + CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] # alpha longitudnial pedal tuning + # These cars use alternate user brake msg (0x1BE) if 0x1BE in fingerprint[CAN.pt] and candidate in (CAR.HONDA_ACCORD, CAR.HONDA_HRV_3G, *HONDA_BOSCH_CANFD): ret.flags |= HondaFlags.BOSCH_ALT_BRAKE.value From f0a78b6c03e4fc536cea7f1b14650480a00f7d68 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 6 Sep 2025 19:51:38 -0400 Subject: [PATCH 80/88] moving to torque tuning based on log --- opendbc/car/torque_data/override.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/opendbc/car/torque_data/override.toml b/opendbc/car/torque_data/override.toml index 87d8b985e18..ce0cea98636 100644 --- a/opendbc/car/torque_data/override.toml +++ b/opendbc/car/torque_data/override.toml @@ -87,6 +87,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "ACURA_MDX_4G_MMR" = [1.25, 1.25, 0.15] "HONDA_CRV_6G" = [1.3, 1.3, 0.2] "HONDA_CITY_7G" = [1.2, 1.2, 0.23] +"ACURA_RDX_3G_MMR" = [1.5, 1.5, 0.16] # Dashcam or fallback configured as ideal car "MOCK" = [10.0, 10, 0.0] From 95d6384957dc84e2f9e24b97f5d34e78dca97876 Mon Sep 17 00:00:00 2001 From: mvl Date: Sat, 6 Sep 2025 19:53:40 -0400 Subject: [PATCH 81/88] Revert "add 3G RDX MMR" This reverts commit fb76f39c98bc859fee55d7e58834e5502674d574. --- opendbc/car/torque_data/substitute.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/opendbc/car/torque_data/substitute.toml b/opendbc/car/torque_data/substitute.toml index b10afec17d2..db26c1a01da 100644 --- a/opendbc/car/torque_data/substitute.toml +++ b/opendbc/car/torque_data/substitute.toml @@ -51,7 +51,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "HONDA_CRV_EU" = "HONDA_CRV" "HONDA_CIVIC_BOSCH_DIESEL" = "HONDA_CIVIC_BOSCH" "HONDA_E" = "HONDA_CIVIC_BOSCH" -"ACURA_RDX_3G_MMR" = "ACURA_RDX_3G" "BUICK_LACROSSE" = "CHEVROLET_VOLT" "BUICK_REGAL" = "CHEVROLET_VOLT" From c4ebb49b21b7fc1510e3fad69d7b8b56c4d7c924 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 6 Sep 2025 19:55:23 -0400 Subject: [PATCH 82/88] Comment cleanup --- opendbc/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 697c351d13b..df6b1a4fc79 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -152,7 +152,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] elif candidate == CAR.ACURA_RDX_3G: - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # TODO: determine if there is a dead zone at the top end + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]] elif candidate == CAR.HONDA_ODYSSEY: From fadcaef82c63de681d36acca5db187982ff8a20e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 6 Sep 2025 19:59:12 -0400 Subject: [PATCH 83/88] typo fix --- opendbc/car/honda/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index df6b1a4fc79..4119a2c1b90 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -180,9 +180,9 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]] CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) - elif candidate == CAR.ACURA_RDX_3G_MMR: + if candidate == CAR.ACURA_RDX_3G_MMR: CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] # alpha longitudnial pedal tuning - + # These cars use alternate user brake msg (0x1BE) if 0x1BE in fingerprint[CAN.pt] and candidate in (CAR.HONDA_ACCORD, CAR.HONDA_HRV_3G, *HONDA_BOSCH_CANFD): ret.flags |= HondaFlags.BOSCH_ALT_BRAKE.value From 25f6458fdd83a1fbab91ead09e8690d694500039 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Sat, 6 Sep 2025 20:03:06 -0400 Subject: [PATCH 84/88] Update steer ratio and standardize minspeed --- opendbc/car/honda/values.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index bc7a6c0eed3..d43ba3ce2eb 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -249,8 +249,8 @@ class CAR(Platforms): flags=HondaFlags.BOSCH_ALT_BRAKE, ) ACURA_RDX_3G_MMR = HondaBoschPlatformConfig( - [HondaCarDocs("Acura RDX 2022-24", "All", min_steer_speed=45. * CV.MPH_TO_MS)], - CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, steerRatio=12.0, centerToFrontRatio=0.41, tireStiffnessFactor=0.677), # as spec + [HondaCarDocs("Acura RDX 2022-24", "All", min_steer_speed=70. * CV.KPH_TO_MS)], + CarSpecs(mass=4079 * CV.LB_TO_KG, wheelbase=2.75, centerToFrontRatio=0.41, steerRatio=16.2), {Bus.pt: 'acura_rdx_2020_can_generated'}, flags=HondaFlags.BOSCH_ALT_BRAKE | HondaFlags.BOSCH_ALT_RADAR, ) From 27d4cfa915452d4623bda237d617168143c25e4e Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 11 Sep 2025 06:56:54 -0400 Subject: [PATCH 85/88] aligning with odyssey carcontroller changes --- opendbc/car/honda/carcontroller.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/opendbc/car/honda/carcontroller.py b/opendbc/car/honda/carcontroller.py index 72ce9c3bb61..e4422307815 100644 --- a/opendbc/car/honda/carcontroller.py +++ b/opendbc/car/honda/carcontroller.py @@ -107,7 +107,6 @@ def __init__(self, dbc_names, CP): self.gas = 0.0 self.brake = 0.0 self.last_torque = 0.0 - self.steer_restricted = False def update(self, CC, CS, now_nanos): actuators = CC.actuators @@ -142,7 +141,6 @@ def update(self, CC, CS, now_nanos): # steer torque is converted back to CAN reference (positive when steering right) apply_torque = int(np.interp(-limited_torque * self.params.STEER_MAX, self.params.STEER_LOOKUP_BP, self.params.STEER_LOOKUP_V)) - self.steer_restricted = (abs(apply_torque) == self.params.STEER_MAX) or CS.steering_blocked # for hud lane line display # Send CAN commands can_sends = [] From 534e66918a5916f3b87235365aaa8d4fc6123e75 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 11 Sep 2025 06:58:37 -0400 Subject: [PATCH 86/88] aligning with odyssey carstate changes --- opendbc/car/honda/carstate.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/opendbc/car/honda/carstate.py b/opendbc/car/honda/carstate.py index 70b68a4b3e5..334491968fe 100644 --- a/opendbc/car/honda/carstate.py +++ b/opendbc/car/honda/carstate.py @@ -44,7 +44,6 @@ def __init__(self, CP): self.dynamic_v_cruise_units = self.CP.carFingerprint in (HONDA_BOSCH_RADARLESS | HONDA_BOSCH_ALT_RADAR | HONDA_BOSCH_CANFD) self.cruise_setting = 0 self.v_cruise_pcm_prev = 0 - self.steering_blocked = False # When available we use cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] to populate vEgoCluster # However, on cars without a digital speedometer this is not always present (HRV, FIT, CRV 2016, ILX and RDX) @@ -188,9 +187,6 @@ def update(self, can_parsers) -> structs.CarState: ret.cruiseState.enabled = cp.vl["POWERTRAIN_DATA"]["ACC_STATUS"] != 0 ret.cruiseState.available = bool(cp.vl[self.car_state_scm_msg]["MAIN_ON"]) - if self.CP.carFingerprint in HONDA_BOSCH_ALT_RADAR: - self.steering_blocked = cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"] != 1 - # Gets rid of Pedal Grinding noise when brake is pressed at slow speeds for some models if self.CP.carFingerprint in (CAR.HONDA_PILOT, CAR.HONDA_RIDGELINE): if ret.brake > 0.1: From 161ccce7c11daf607d9dc31085838a1d867882f0 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 11 Sep 2025 07:27:17 -0400 Subject: [PATCH 87/88] clean up merge conflict --- opendbc/car/honda/fingerprints.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 16fab576772..c943e31ea6d 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -730,6 +730,7 @@ ], (Ecu.shiftByWire, 0x18da0bf1, None): [ b'54008-TJB-A520\x00\x00', + b'54008-TJB-A530\x00\x00', ], (Ecu.transmission, 0x18da1ef1, None): [ b'28102-5YK-A610\x00\x00', From 547dd9bdfee20992a2ddd14f888a8a2fdd6c7b79 Mon Sep 17 00:00:00 2001 From: mvl-boston Date: Thu, 11 Sep 2025 23:48:46 -0400 Subject: [PATCH 88/88] spelling --- opendbc/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index ef59da4eb1e..f612e9ee897 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -195,7 +195,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) if candidate == CAR.ACURA_RDX_3G_MMR: - CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] # alpha longitudnial pedal tuning + CarControllerParams.BOSCH_GAS_LOOKUP_V = [0, 2000] # alpha longitudinal pedal tuning # These cars use alternate user brake msg (0x1BE) if 0x1BE in fingerprint[CAN.pt] and candidate in (CAR.HONDA_ACCORD, CAR.HONDA_HRV_3G, *HONDA_BOSCH_CANFD):