mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-29 16:23:55 +08:00
Verify Ordinary End to End Cruise Smoothing
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user