This commit is contained in:
firestar5683
2026-05-21 11:03:10 -05:00
parent c848b5f1b4
commit a94c3b72d3
2 changed files with 12 additions and 0 deletions
@@ -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]]
@@ -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)