Verify Ordinary End to End Cruise Smoothing

This commit is contained in:
firestar5683
2026-11-28 11:09:35 -06:00
parent 4216f08525
commit 00a57ea4c5
@@ -131,6 +131,14 @@ class TestModelLeadTrajectory(unittest.TestCase):
self.assertFalse(np.array_equal(actual.mpc.params[:, 2], legacy.mpc.params[:, 2]))
np.testing.assert_array_equal(actual.mpc.params[:, [0, 1, 3, 4, 5]], legacy.mpc.params[:, [0, 1, 3, 4, 5]])
def test_cruise_smoothing_runs_only_on_ordinary_end_to_end(self):
from openpilot.selfdrive.controls.lib.longitudinal_planner import get_cruise_accel
cp = self.planner().CP
ordinary = get_cruise_accel(True, 20.4, 20., .1, 0., cp, .05, 0., True)
bypass = get_cruise_accel(True, 20.4, 20., .1, 0., cp, .05, 0., True, faster_takeoffs=True)
self.assertGreater(ordinary, .1)
self.assertLess(ordinary, bypass)
def test_actual_planner_applies_automatic_boost_only_for_standard_and_aggressive(self):
for personality, automatic in (('relaxed', False), ('standard', True), ('aggressive', True)):
with self.subTest(personality=personality):