From 60f7f59a7038bd504dc53a119298ad6bc0f72940 Mon Sep 17 00:00:00 2001 From: Michael Kennedy <34204085+mlists@users.noreply.github.com> Date: Thu, 14 Mar 2024 14:02:50 +1100 Subject: [PATCH] Reorder and reroute our southern autonomous paths --- autonomous/autonomous.py | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/autonomous/autonomous.py b/autonomous/autonomous.py index f24b7a03..746e6abf 100644 --- a/autonomous/autonomous.py +++ b/autonomous/autonomous.py @@ -169,33 +169,31 @@ def __init__(self) -> None: super().__init__(note_paths, shoot_paths, start_pose) -class Centre3Centre5(AutoBase): +class Centre5Centre4(AutoBase): # Stay in the south of the field to avoid interfering with allies using the close notes - MODE_NAME = "3 notes: centre 3, centre 5" + MODE_NAME = "3 notes: centre 5, centre 4" def __init__(self) -> None: note_paths = [ + Path([NotePositions.Centre5], face_target=False), Path( [ - PathPositions.stage_transition_S_entry, - PathPositions.stage_transition_S, - NotePositions.Centre3, + PathPositions.avoid_stage_S, + NotePositions.Centre4, ], face_target=False, ), - Path([NotePositions.Centre5], face_target=False), ] shoot_paths = [ + Path([ShootingPositions.source_side], face_target=True), Path( [ - PathPositions.stage_transition_S, - PathPositions.stage_transition_S_entry, + PathPositions.avoid_stage_S, ShootingPositions.source_side, ], face_target=True, ), - Path([ShootingPositions.source_side], face_target=True), ] sim_start_pos = Translation2d(15.4, 2.94) rotation = rotation_to_red_speaker(sim_start_pos) @@ -203,47 +201,47 @@ def __init__(self) -> None: super().__init__(note_paths, shoot_paths, sim_start_pose) -class Centre3Centre4Centre5(AutoBase): +class Centre5Centre4Centre3(AutoBase): # Stay in the south of the field to avoid interfering with allies using the close notes - MODE_NAME = "4 notes: centre 3, centre 4, centre 5" + MODE_NAME = "4 notes: centre 5, centre 4, centre 3" def __init__(self) -> None: note_paths = [ + Path([NotePositions.Centre5], face_target=False), Path( [ - PathPositions.stage_transition_S_entry, - PathPositions.stage_transition_S, - NotePositions.Centre3, + PathPositions.avoid_stage_S, + NotePositions.Centre4, ], face_target=False, ), Path( [ - PathPositions.avoid_stage_S, - NotePositions.Centre4, + PathPositions.stage_transition_S_entry, + PathPositions.stage_transition_S, + NotePositions.Centre3, ], face_target=False, ), - Path([NotePositions.Centre5], face_target=False), ] shoot_paths = [ + Path([ShootingPositions.source_side], face_target=True), Path( [ - PathPositions.stage_transition_S, - PathPositions.stage_transition_S_entry, + PathPositions.avoid_stage_S, ShootingPositions.source_side, ], face_target=True, ), Path( [ - PathPositions.avoid_stage_S, + PathPositions.stage_transition_S, + PathPositions.stage_transition_S_entry, ShootingPositions.source_side, ], face_target=True, ), - Path([ShootingPositions.source_side], face_target=True), ] sim_start_pos = Translation2d(15.4, 2.94) rotation = rotation_to_red_speaker(sim_start_pos)