Open
Conversation
Added Auto_Further_Front 100 inches - than HUB_CENTER. Added a command for going backwards and shooting fuel. Added this command as a Auton in robot container.
codeNinja-1
requested changes
Mar 26, 2026
| this.autoOutpost = new AutoOutpost(robot, shootFuel); | ||
| this.autoEdgeIntake = new AutoEdgeIntake(robot); | ||
| this.collectFuelFromHub = new CollectFuelFromHub(robot); | ||
| this.hopperSensors = new HopperSensors(); |
Collaborator
There was a problem hiding this comment.
Don't create a new HopperSensors. Instead use robot.getHopperSenors().
| public final AutoOutpost autoOutpost; | ||
| public final AutoEdgeIntake autoEdgeIntake; | ||
| public final CollectFuelFromHub collectFuelFromHub; | ||
| public final HopperSensors hopperSensors; |
Collaborator
There was a problem hiding this comment.
You don't need this field. Just use robot.getHopperSensors() instead.
| shootFuel.shoot()); | ||
| } | ||
|
|
||
| public Command moveBackwardAndShoot() { |
Collaborator
There was a problem hiding this comment.
Add a Javadoc comment to this method.
| public Command moveBackwardAndShoot() { | ||
| return Commands.sequence( | ||
| robot.getSwerveDrive().driveTo(FieldPositions.HUB_FURTHER_FRONT), shootFuel.shoot()) | ||
| .until(() -> hopperSensors.isHopperEmpty()); |
Collaborator
There was a problem hiding this comment.
Don't stop shooting even if the hopper is empty. We want to remove as many failure points as we can, and it's possible that no fuel could be blocking the sensor for a brief time.
|
|
||
| public Command moveBackwardAndShoot() { | ||
| return Commands.sequence( | ||
| robot.getSwerveDrive().driveTo(FieldPositions.HUB_FURTHER_FRONT), shootFuel.shoot()) |
Collaborator
There was a problem hiding this comment.
- Run
AutoShootin parallel to make the shooter aim at the hub - Make
shootFuel.shoot()only run when the trigger returned byautoShoot.isReadyToShoot()outputs true (you can do this withshootFuel.shoot().onlyWhile(autoShoot::isReadyToShoot).repeatedly()).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Auto_Further_Front 100 inches - than HUB_CENTER. Added a command for going backwards and shooting fuel plus a deadline using the .until function. Added this command as a Auton in robot container.