Skip to content

Algae Alignment State Machine#348

Merged
Rongrrz merged 19 commits intomainfrom
SafetyAndStealingAlgae
Apr 2, 2025
Merged

Algae Alignment State Machine#348
Rongrrz merged 19 commits intomainfrom
SafetyAndStealingAlgae

Conversation

@Rongrrz
Copy link
Copy Markdown
Contributor

@Rongrrz Rongrrz commented Mar 31, 2025

Why are we doing this?

So we won't ram into the wall & can possibly steal algae from opposition

Asana task URL:

Whats changing?

A whole new state machine! (Or am I just overcomplicating everything?)

Questions/notes for reviewers

Probably requires tuning the double properties...

How this was tested

  • tested on robot
  • tested in simulator
  • unit tests added

Video/screenshots (from simulator or live robot)


PR feedback legend

Symbol Meaning
⭐ ⭐ ⭐ must be addressed
⭐ ⭐ should be addressed
something to consider, a good idea

@Rongrrz Rongrrz requested a review from a team as a code owner March 31, 2025 01:57
@Rongrrz Rongrrz requested a review from aschokking March 31, 2025 01:57
@aschokking
Copy link
Copy Markdown
Contributor

Could you attach a video of it working in the sim?

Comment thread src/main/java/competition/subsystems/pose/PoseSubsystem.java Outdated
Comment thread src/main/java/competition/subsystems/vision/AprilTagVisionSubsystemExtended.java Outdated
this.simulatedModulePositions = Optional.of(positions);
}

public static List<Pose2d> getBlueReefFacePoses() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ I know you're just extending an existing pattern, but the approach here to finding the "nearest" involves creating a bunch of objects and then disposing of them afterwards. Would be nice to have something more like the following:

  1. At robot boot time, create a blue list and red list (only once)
  2. At execution time, choose a given list based on what alliance you are and do the nearest calculation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't change this now, but in a follow-up PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Onto it!

@Rongrrz Rongrrz dismissed aschokking’s stale review April 2, 2025 02:31

IDK why this is not going away...

@Rongrrz Rongrrz merged commit 2ed6749 into main Apr 2, 2025
1 check passed
@Rongrrz Rongrrz deleted the SafetyAndStealingAlgae branch April 2, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants