Skip to content

Commit

Permalink
Reorder and reroute our southern autonomous paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mlists committed Mar 14, 2024
1 parent d09dd78 commit 60f7f59
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions autonomous/autonomous.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,81 +169,79 @@ 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)
sim_start_pose = Pose2d(sim_start_pos, rotation)
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)
Expand Down

0 comments on commit 60f7f59

Please sign in to comment.