diff --git a/opendbc_repo/opendbc/car/honda/interface.py b/opendbc_repo/opendbc/car/honda/interface.py index 53a3e41f1..97779893d 100644 --- a/opendbc_repo/opendbc/car/honda/interface.py +++ b/opendbc_repo/opendbc/car/honda/interface.py @@ -195,6 +195,9 @@ class CarInterface(CarInterfaceBase): ret.wheelSpeedFactor = 1.025 else: ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] # TODO: can probably use some tuning + # The 3G HR-V settles more cleanly in lead follow when planner delay + # better matches its stronger immediate longitudinal response. + ret.longitudinalActuatorDelay = 0.4 elif candidate == CAR.HONDA_CLARITY: ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]] diff --git a/opendbc_repo/opendbc/car/honda/tests/test_honda.py b/opendbc_repo/opendbc/car/honda/tests/test_honda.py index fd875dc22..86e62eb32 100644 --- a/opendbc_repo/opendbc/car/honda/tests/test_honda.py +++ b/opendbc_repo/opendbc/car/honda/tests/test_honda.py @@ -266,3 +266,12 @@ class TestHondaFingerprint: new_actuators, _ = controller.update(CC.as_reader(), CS, 0, toggles) assert new_actuators.accel == pytest.approx(-0.3) + + def test_honda_hrv_3g_uses_matched_longitudinal_delay(self): + toggles = get_test_toggles() + + hrv3g_cp = CarInterface.get_params(CAR.HONDA_HRV_3G, gen_empty_fingerprint(), [], True, False, False, toggles) + accord_cp = CarInterface.get_params(CAR.HONDA_ACCORD, gen_empty_fingerprint(), [], True, False, False, toggles) + + assert hrv3g_cp.longitudinalActuatorDelay == pytest.approx(0.4) + assert accord_cp.longitudinalActuatorDelay == pytest.approx(0.5)