-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Dev #29
Changes from all commits
0fad1ac
7b281c2
aff073d
a45d106
a93400d
8c3a876
48875b7
f6c5a7c
6522d8a
53fc6e1
bfcc454
883add7
5604fa0
6bdc83d
89a72a6
a3a6d42
456e939
3f4d646
204470b
779c470
26a4e70
ef1d29f
d18c2ee
8780d1e
c09aefc
c177ea3
5fe7509
98f9216
247c198
94e4b5b
a88fb13
0f718f0
0399a40
937117c
8f463be
1c60f7d
8738ba1
1e5ba97
b3f844c
de3c682
9ee334c
b15b4dd
41a47b5
7387872
a23d92d
401e263
73f8672
f72905c
b30244a
0e65033
ac2ca04
ea633be
2c0ce29
ff18479
fec5163
4be96a4
ab141c8
a876e79
fa8494f
7ebdf2a
3355f90
1a5275c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"version": "2025.0", | ||
"waypoints": [ | ||
{ | ||
"anchor": { | ||
"x": 2.0, | ||
"y": 7.0 | ||
}, | ||
"prevControl": null, | ||
"nextControl": { | ||
"x": 3.0, | ||
"y": 7.0 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 4.0, | ||
"y": 6.0 | ||
}, | ||
"prevControl": { | ||
"x": 3.0, | ||
"y": 6.0 | ||
}, | ||
"nextControl": null, | ||
"isLocked": false, | ||
"linkedName": null | ||
} | ||
], | ||
"rotationTargets": [], | ||
"constraintZones": [], | ||
"pointTowardsZones": [], | ||
"eventMarkers": [], | ||
"globalConstraints": { | ||
"maxVelocity": 4.0, | ||
"maxAcceleration": 4.0, | ||
"maxAngularVelocity": 400.0, | ||
"maxAngularAcceleration": 400.0, | ||
"nominalVoltage": 12.0, | ||
"unlimited": false | ||
}, | ||
"goalEndState": { | ||
"velocity": 0, | ||
"rotation": 0.0 | ||
}, | ||
"reversed": false, | ||
"folder": null, | ||
"idealStartingState": { | ||
"velocity": 0, | ||
"rotation": 0.0 | ||
}, | ||
"useDefaultConstraints": true | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -49,7 +49,7 @@ public static Command getFloorAlgaeCollectionCommand() { | |||||||||||||||||||||||||||||||||
return new SequentialCommandGroup( | ||||||||||||||||||||||||||||||||||
GeneralCommands.getResetFlipArmOverrideCommand(), | ||||||||||||||||||||||||||||||||||
CoralCollectionCommands.getUnloadCoralCommand().onlyIf(RobotContainer.END_EFFECTOR::hasGamePiece), | ||||||||||||||||||||||||||||||||||
getInitiateFloorAlgaeCollectionCommand().until(RobotContainer.END_EFFECTOR::hasGamePiece), | ||||||||||||||||||||||||||||||||||
getInitiateFloorAlgaeCollectionCommand().raceWith(new WaitUntilCommand(RobotContainer.END_EFFECTOR::hasGamePiece).andThen(new WaitCommand(0.1))), | ||||||||||||||||||||||||||||||||||
new InstantCommand(() -> { | ||||||||||||||||||||||||||||||||||
IS_HOLDING_ALGAE = true; | ||||||||||||||||||||||||||||||||||
SHOULD_COLLECT_FROM_LOLLIPOP = false; | ||||||||||||||||||||||||||||||||||
|
@@ -64,7 +64,7 @@ public static Command getReefAlgaeCollectionCommand() { | |||||||||||||||||||||||||||||||||
return new SequentialCommandGroup( | ||||||||||||||||||||||||||||||||||
GeneralCommands.getResetFlipArmOverrideCommand(), | ||||||||||||||||||||||||||||||||||
CoralCollectionCommands.getUnloadCoralCommand().onlyIf(RobotContainer.END_EFFECTOR::hasGamePiece), | ||||||||||||||||||||||||||||||||||
getInitiateReefAlgaeCollectionCommand().until(RobotContainer.END_EFFECTOR::hasGamePiece), | ||||||||||||||||||||||||||||||||||
getInitiateReefAlgaeCollectionCommand().raceWith(new WaitUntilCommand(RobotContainer.END_EFFECTOR::hasGamePiece).andThen(new WaitCommand(0.1))), | ||||||||||||||||||||||||||||||||||
new InstantCommand(() -> IS_HOLDING_ALGAE = true), | ||||||||||||||||||||||||||||||||||
GeneralCommands.getResetFlipArmOverrideCommand(), | ||||||||||||||||||||||||||||||||||
getScoreAlgaeCommand().alongWith(getAlgaeCollectionConfirmationCommand()) | ||||||||||||||||||||||||||||||||||
|
@@ -110,6 +110,13 @@ private static Command getHoldAlgaeCommand() { | |||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
private static Command getScoreInNetCommand() { | ||||||||||||||||||||||||||||||||||
return new ParallelRaceGroup( | ||||||||||||||||||||||||||||||||||
GeneralCommands.getFlippableOverridableArmCommand(ArmElevatorConstants.ArmElevatorState.SCORE_NET, false, AlgaeManipulationCommands::shouldReverseNetScore), | ||||||||||||||||||||||||||||||||||
GeneralCommands.runWhen(EndEffectorCommands.getSetTargetStateCommand(EndEffectorConstants.EndEffectorState.SCORE_ALGAE), OperatorConstants.CONTINUE_TRIGGER) | ||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
Comment on lines
112
to
+117
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scoring race may never finish; add an ejection-complete condition. Both subcommands are effectively non-terminating. Race will only end if externally canceled. Add a “piece left” condition to auto-finish. - return new ParallelRaceGroup(
+ return new ParallelRaceGroup(
GeneralCommands.getFlippableOverridableArmCommand(ArmElevatorConstants.ArmElevatorState.SCORE_NET, false, AlgaeManipulationCommands::shouldReverseNetScore),
GeneralCommands.runWhen(EndEffectorCommands.getSetTargetStateCommand(EndEffectorConstants.EndEffectorState.SCORE_ALGAE), OperatorConstants.CONTINUE_TRIGGER)
- );
+ )
+ .raceWith(new WaitUntilCommand(() -> !RobotContainer.END_EFFECTOR.hasGamePiece()).andThen(new WaitCommand(0.2))); 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
private static Command getAutonomouslyScoreInNetCommand() { | ||||||||||||||||||||||||||||||||||
return new ParallelRaceGroup( | ||||||||||||||||||||||||||||||||||
GeneralCommands.getFlippableOverridableArmCommand(ArmElevatorConstants.ArmElevatorState.SCORE_NET, false, AlgaeManipulationCommands::shouldReverseNetScore), | ||||||||||||||||||||||||||||||||||
GeneralCommands.runWhen(EndEffectorCommands.getSetTargetStateCommand(EndEffectorConstants.EndEffectorState.SCORE_ALGAE), OperatorConstants.CONTINUE_TRIGGER), | ||||||||||||||||||||||||||||||||||
|
@@ -119,7 +126,14 @@ private static Command getScoreInNetCommand() { | |||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
private static Command getScoreInProcessorCommand() { | ||||||||||||||||||||||||||||||||||
return new ParallelCommandGroup( | ||||||||||||||||||||||||||||||||||
GeneralCommands.getFlippableOverridableArmCommand(ArmElevatorConstants.ArmElevatorState.SCORE_PROCESSOR, false), | ||||||||||||||||||||||||||||||||||
ArmElevatorCommands.getSetTargetStateCommand(ArmElevatorConstants.ArmElevatorState.SCORE_PROCESSOR), | ||||||||||||||||||||||||||||||||||
GeneralCommands.runWhen(EndEffectorCommands.getSetTargetStateCommand(EndEffectorConstants.EndEffectorState.SCORE_ALGAE), OperatorConstants.CONTINUE_TRIGGER) | ||||||||||||||||||||||||||||||||||
).finallyDo(GeneralCommands.getFieldRelativeDriveCommand()::schedule); | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
private static Command getAtonomouslyScoreInProcessorCommand() { | ||||||||||||||||||||||||||||||||||
return new ParallelCommandGroup( | ||||||||||||||||||||||||||||||||||
ArmElevatorCommands.getSetTargetStateCommand(ArmElevatorConstants.ArmElevatorState.SCORE_PROCESSOR), | ||||||||||||||||||||||||||||||||||
GeneralCommands.runWhen(EndEffectorCommands.getSetTargetStateCommand(EndEffectorConstants.EndEffectorState.SCORE_ALGAE), OperatorConstants.CONTINUE_TRIGGER), | ||||||||||||||||||||||||||||||||||
getDriveToProcessorCommand() | ||||||||||||||||||||||||||||||||||
).finallyDo(GeneralCommands.getFieldRelativeDriveCommand()::schedule); | ||||||||||||||||||||||||||||||||||
|
@@ -181,7 +195,7 @@ private static Command getCollectAlgaeFromLollipopSequenceCommand() { | |||||||||||||||||||||||||||||||||
.onlyIf(() -> OperatorConstants.SHOULD_FLIP_ARM_OVERRIDE) | ||||||||||||||||||||||||||||||||||
.until(() -> !OperatorConstants.SHOULD_FLIP_ARM_OVERRIDE) | ||||||||||||||||||||||||||||||||||
.repeatedly() | ||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||
).finallyDo(() -> SHOULD_COLLECT_FROM_LOLLIPOP = false); | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
private static Command getCollectAlgaeFromFloorSequenceCommand() { | ||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.