Skip to content

Add barge algae auto#232

Merged
aidnem merged 11 commits intomainfrom
227-hardcode-barge-auto
Apr 23, 2025
Merged

Add barge algae auto#232
aidnem merged 11 commits intomainfrom
227-hardcode-barge-auto

Conversation

@aidnem
Copy link
Copy Markdown
Contributor

@aidnem aidnem commented Apr 3, 2025

Adds a flag to AutoStrategy that, when true, ignores the strategy you have and replaces it with:

  • Score 1 coral on reef 0 L4
  • Drive slowly back to auto line
  • Intake L2 algae while driving slowly forward from auto line
  • Drive slowly back to auto line
  • Score net

@aidnem aidnem linked an issue Apr 3, 2025 that may be closed by this pull request
@aidnem aidnem requested a review from jkleiber April 3, 2025 21:48
Copy link
Copy Markdown
Contributor

@jkleiber jkleiber left a comment

Choose a reason for hiding this comment

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

first pass comments

Comment thread src/main/java/frc/robot/StrategyManager.java Outdated
Comment thread src/main/java/frc/robot/commands/strategies/AutoDriveToLine.java Outdated
Comment thread src/main/java/frc/robot/subsystems/drive/Drive.java Outdated
Comment on lines +2 to +7
"scoringLocations": [
"Reef0"
],
"scoringLevels": [
"L4"
],
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.

note: these currently do nothing

Comment thread src/main/java/frc/robot/StrategyManager.java
@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 16, 2025

@jkleiber I think I'll complete this and then we can replace it with correct StrategyManager implementation later. The new desired locations will provide a decent starting point so we don't have to write that stuff again.

aidnem added 2 commits April 16, 2025 12:38
…ecessary logs, fix incorrect logging, add another drive to algae action to get move points
@aidnem aidnem requested a review from jkleiber April 16, 2025 16:40
Copy link
Copy Markdown
Contributor

@jkleiber jkleiber left a comment

Choose a reason for hiding this comment

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

let's try to test this in shop today - maybe we can get fab to prioritize the correct reef poles, or we can just hand the robot the algae directly

aidnem and others added 3 commits April 16, 2025 16:02
…up to avoid far warmup happening in algae mode and flipping the robot over
@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 17, 2025

  • I am extremely skeptical of how we went from fully functional sequence to unable to back away from the reef. I've looked over the diff and nothing looks super suspicious so I'm going to mess around with stuff and hopefully get it working.

  • Also I need to root cause why scoring is staying up while backing away from that first score, it should be automatically cancelling.

@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 17, 2025

Something is incredibly suspicious here:
image

It looks like AutoIntakeBargeAlgae's end method:

image

is getting called AFTER the init of AutoDriveToLocation and therefore it's cancelling the linear drive:

image

…fix command scheduler classic) & make progress toward back-to-back linear drive commands working properly
@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 17, 2025

In an insane turn of events, the command scheduler was only ending the previous command after we scheduled the next one. Fixed by just adding a manual call to cancel in strategy manager so that it cancels commands whenever they report that they are finished so that they don't linger until the next CommandScheduler loop and destroy robot state with their end() methods.

@jkleiber
Copy link
Copy Markdown
Contributor

Nice find @aidnem !

@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 17, 2025

Still no luck on making the final drive to position command work, its ending way too early. I'm very close though, I added a ton of logging and I'm 90% sure it's ending before it can properly initialize so its goal pose is really cooked. I can try more over the weekend.

@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 17, 2025

Apparently you can break wiring in sim too?? not sure what's happening but I'm going to restart my laptop and maybe give up for today

image

edit: I was accidentally launching hardware sim instead of normal sim 🤦

aidnem added 2 commits April 17, 2025 18:37
…evator would stay up while linear driving away after a score due to erroneously zero-ticking into early warmup
@aidnem aidnem requested a review from jkleiber April 17, 2025 23:16
@aidnem
Copy link
Copy Markdown
Contributor Author

aidnem commented Apr 17, 2025

127.0.0.1.AdvantageScope.2025-04-17.18-39-57.mp4

This video is from before I fixed the elevator staying up bug but it shows everything else working flawlessly :)

Copy link
Copy Markdown
Contributor

@jkleiber jkleiber left a comment

Choose a reason for hiding this comment

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

just some code comments

Comment thread src/main/java/frc/robot/subsystems/drive/Drive.java Outdated
Comment thread src/main/java/frc/robot/subsystems/scoring/ClawMechanism.java Outdated
@aidnem aidnem requested a review from jkleiber April 19, 2025 17:42
@jkleiber
Copy link
Copy Markdown
Contributor

jkleiber commented Apr 23, 2025

@aidnem verification evidence from shop

@aidnem aidnem merged commit 378c4d2 into main Apr 23, 2025
3 checks passed
@jkleiber jkleiber deleted the 227-hardcode-barge-auto branch April 23, 2025 23:20
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.

Pick an algae off the reef in auto

3 participants