From 498bf21f26bf9de1e52207593b79963511c576a9 Mon Sep 17 00:00:00 2001 From: Jackack Date: Sat, 3 Feb 2024 10:52:41 -0500 Subject: [PATCH] Adjusted heading error weight. Widened path index lookup range. --- rb_ws/src/buggy/scripts/auton/stanley_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rb_ws/src/buggy/scripts/auton/stanley_controller.py b/rb_ws/src/buggy/scripts/auton/stanley_controller.py index f2138a33..5cf95e50 100644 --- a/rb_ws/src/buggy/scripts/auton/stanley_controller.py +++ b/rb_ws/src/buggy/scripts/auton/stanley_controller.py @@ -23,7 +23,7 @@ class StanleyController(Controller): MAX_LOOK_AHEAD_DIST = 2 CROSS_TRACK_GAIN = 1 - HEADING_GAIN = 0.75 + HEADING_GAIN = 0.3 def __init__(self, buggy_name, start_index=0) -> None: super(StanleyController, self).__init__(start_index, buggy_name) @@ -63,8 +63,8 @@ def compute_control( traj_index = trajectory.get_closest_index_on_path( front_x, front_y, - start_index=self.current_traj_index, - end_index=self.current_traj_index + 10, + start_index=self.current_traj_index - 20, + end_index=self.current_traj_index + 50, ) self.current_traj_index = max(traj_index, self.current_traj_index)