diff --git a/poetry.lock b/poetry.lock index c7258e0467..31d9f1bf41 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5927a7ae645bd73419b2d96501b71e1baa10a6e2f49cf42b043e8a689a7d68bc -size 370950 +oid sha256:022ad1dc837484b37034c71bd6855e317a61039e96a4b1d7c7b6ea80c6faf893 +size 371531 diff --git a/pyproject.toml b/pyproject.toml index dcce2505e1..b5d03e9b4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ aiohttp = "*" aiortc = "*" casadi = "==3.6.3" cffi = "*" +control = "*" crcmod = "*" cryptography = "*" Cython = "*" diff --git a/selfdrive/controls/lib/tests/__init__.py b/selfdrive/controls/lib/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/selfdrive/controls/lib/tests/test_latcontrol.py b/selfdrive/controls/lib/tests/test_latcontrol.py index 4ff7ef7c93..cf2243d033 100755 --- a/selfdrive/controls/lib/tests/test_latcontrol.py +++ b/selfdrive/controls/lib/tests/test_latcontrol.py @@ -12,6 +12,7 @@ from openpilot.selfdrive.controls.lib.latcontrol_pid import LatControlPID from openpilot.selfdrive.controls.lib.latcontrol_torque import LatControlTorque from openpilot.selfdrive.controls.lib.latcontrol_angle import LatControlAngle from openpilot.selfdrive.controls.lib.vehicle_model import VehicleModel +from selfdrive.navd.tests.test_map_renderer import gen_llk class TestLatControl(unittest.TestCase): @@ -27,13 +28,15 @@ class TestLatControl(unittest.TestCase): CS = car.CarState.new_message() CS.vEgo = 30 + CS.steeringPressed = False last_actuators = car.CarControl.Actuators.new_message() params = log.LiveParametersData.new_message() + llk = gen_llk() for _ in range(1000): - _, _, lac_log = controller.update(True, CS, CP, VM, params, last_actuators, True, 1, 0) + _, _, lac_log = controller.update(True, CS, VM, params, last_actuators, False, 1, 0, llk) self.assertTrue(lac_log.saturated) diff --git a/selfdrive/controls/lib/tests/test_vehicle_model.py b/selfdrive/controls/lib/tests/test_vehicle_model.py index fc8ef2fb56..d016e87527 100755 --- a/selfdrive/controls/lib/tests/test_vehicle_model.py +++ b/selfdrive/controls/lib/tests/test_vehicle_model.py @@ -38,7 +38,7 @@ class TestVehicleModel(unittest.TestCase): # Compute yaw rate using direct computations yr2 = self.VM.yaw_rate(sa, u, roll) - self.assertAlmostEqual(float(yr1), yr2) + self.assertAlmostEqual(float(yr1[0]), yr2) def test_syn_ss_sol_simulate(self): """Verifies that dyn_ss_sol matches a simulation"""