From c2c0fd39ddf76e4c31077cce612d386fee6f148b Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sat, 28 Nov 2026 11:12:07 -0600 Subject: [PATCH] Damp shallow highway curves on Ioniq 5 HDA II --- openpilot/starpilot/lateral/hkg_vehicle_policy.py | 3 +++ .../starpilot/lateral/tests/test_hkg_torque_context.py | 7 +++++++ prebuilt.json | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/openpilot/starpilot/lateral/hkg_vehicle_policy.py b/openpilot/starpilot/lateral/hkg_vehicle_policy.py index 18cbd99b95..b8368dd546 100644 --- a/openpilot/starpilot/lateral/hkg_vehicle_policy.py +++ b/openpilot/starpilot/lateral/hkg_vehicle_policy.py @@ -129,6 +129,9 @@ class HKGVehicleTorquePolicy(HKGShapedTorquePolicy): highway = float(np.interp(speed, [27.0, 29.0], [0.0, 1.0])) arc = float(np.interp(abs(setpoint), [0.45, 0.65, 1.25, 1.6], [0.0, 1.0, 1.0, 0.0])) threshold += 0.18 * highway * arc + high_speed = float(np.interp(speed, (28., 30., 33., 36.), (0., 1., 1., 0.))) + shallow_arc = float(np.interp(abs(setpoint), (.35, .45, .70, .90), (0., 1., 1., 0.))) + threshold += .80 * high_speed * shallow_arc return threshold, 1 + ( shaping.get_ioniq_5_friction_scale(speed, setpoint, jerk) - 1 ) * shaping.get_ioniq_5_center_taper_scale(setpoint, speed) diff --git a/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py b/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py index ab7f33c147..4f596820ab 100644 --- a/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py +++ b/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py @@ -126,6 +126,13 @@ def test_actual_first_driver_release_tick_preserves_dom_override_bypass(monkeypa (True, 28.0, 0.9, False, False, 0.09), (True, 26.0, 0.9, False, False, 0.0), (True, 30.0, 0.3, False, False, 0.0), + (True, 30.0, 0.55, False, False, 0.89), + (True, 34.5, 0.55, False, False, 0.49), + (True, 36.0, 0.55, False, False, 0.09), + (True, 27.0, 0.55, False, False, 0.0), + (True, 30.0, 0.55, True, False, 0.0), + (True, 30.0, 0.55, False, True, 0.0), + (False, 30.0, 0.55, False, False, 0.0), (True, 30.0, 1.8, False, False, 0.0), (True, 30.0, 0.9, True, False, 0.0), (True, 30.0, 0.9, False, True, 0.0), diff --git a/prebuilt.json b/prebuilt.json index cd253faad1..19e0837191 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "8a1990e726cf7d4e429d956c13b4f0d2c4346abf1641feb4c29e1c60aaf300c2", "schema_version": 1} +{"protected_inventory_sha256": "2b54056a0a0c5c5c98df43b417ccabcac4f483f074bc4fa12145b80bfeb8da30", "schema_version": 1}