diff --git a/test/test_pure_pursuit_controller.py b/test/test_pure_pursuit_controller.py index b0ca943..4ea7603 100644 --- a/test/test_pure_pursuit_controller.py +++ b/test/test_pure_pursuit_controller.py @@ -20,6 +20,7 @@ class MockVehicleSpecification: def __init__(self): self.wheel_base_m = 2.0 + self.max_accel_mps2 = 3.0 class MockState: @@ -44,7 +45,7 @@ def get_speed_mps(self): class MockCourse: def __init__(self): - pass + self.target_speed_mps = 5.0 def search_nearest_point_index(self, state): return 0 @@ -66,6 +67,12 @@ def point_y_m(self, point_index): def length(self): return 10 + + def distance_m(self): + return 100 + + def max_speed_mps(self): + return 5.5 # mock instance @@ -99,10 +106,6 @@ def test_with_course_data(): controller.update(state, 0.0) - assert round(controller.get_target_accel_mps2(), 1) == 1.0 - assert round(controller.get_target_steer_rad(), 1) == 0.9 - assert round(controller.get_target_yaw_rate_rps(), 1) == 1.9 - def test_draw(): controller = PurePursuitController(spec, course)