Skip to content

Commit

Permalink
auto locked in
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-Cushman committed Oct 30, 2024
1 parent 881c5a8 commit 47f4cde
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 20 deletions.
8 changes: 7 additions & 1 deletion src/main/deploy/pathplanner/paths/C2 L.path
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
"linkedName": "L"
}
],
"rotationTargets": [],
"rotationTargets": [
{
"waypointRelativePos": 0.7,
"rotationDegrees": -169.07393297298722,
"rotateFast": false
}
],
"constraintZones": [
{
"name": "GrabVision",
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/C3 M.path
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 175.60129464500451,
"rotation": 177.65775021147127,
"rotateFast": false
},
"reversed": false,
Expand Down
24 changes: 21 additions & 3 deletions src/main/deploy/pathplanner/paths/C4 R.path
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,26 @@
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"rotationTargets": [
{
"waypointRelativePos": 0.75,
"rotationDegrees": 144.2413348418667,
"rotateFast": false
}
],
"constraintZones": [
{
"name": "GrabVision",
"minWaypointRelativePos": 0.75,
"maxWaypointRelativePos": 1.0,
"constraints": {
"maxVelocity": 2.5,
"maxAcceleration": 3.5,
"maxAngularVelocity": 1137.21,
"maxAngularAcceleration": 1492.9
}
}
],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 5.0,
Expand All @@ -39,7 +57,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 147.46082990008907,
"rotation": 143.91328920967564,
"rotateFast": false
},
"reversed": false,
Expand Down
10 changes: 8 additions & 2 deletions src/main/deploy/pathplanner/paths/C5 R.path
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
"linkedName": "R"
}
],
"rotationTargets": [],
"rotationTargets": [
{
"waypointRelativePos": 0.7,
"rotationDegrees": 142.93487488555044,
"rotateFast": false
}
],
"constraintZones": [
{
"name": "GrabVision",
Expand All @@ -51,7 +57,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 149.52396142150144,
"rotation": 144.48210042252708,
"rotateFast": false
},
"reversed": false,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/P R.path
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"goalEndState": {
"velocity": 0.0,
"rotation": 141.88331200332212,
"rotation": 146.31288471198457,
"rotateFast": false
},
"reversed": false,
Expand Down
8 changes: 7 additions & 1 deletion src/main/deploy/pathplanner/paths/R C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@
"linkedName": "C3"
}
],
"rotationTargets": [],
"rotationTargets": [
{
"waypointRelativePos": 1.0,
"rotationDegrees": -179.8337009350905,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
Expand Down
14 changes: 7 additions & 7 deletions src/main/deploy/pathplanner/paths/R C5.path
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"prevControl": null,
"nextControl": {
"x": 5.571637869135895,
"y": 1.0939443854470392
"x": 5.250408215102145,
"y": 1.7151565731702902
},
"isLocked": false,
"linkedName": "R"
Expand All @@ -20,8 +20,8 @@
"y": 0.7612043754757987
},
"prevControl": {
"x": 6.122376373498586,
"y": 1.424387488064655
"x": 6.159294604303494,
"y": 1.3046917522406485
},
"nextControl": null,
"isLocked": false,
Expand All @@ -39,13 +39,13 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 164.66924611277807,
"rotateFast": true
"rotation": 170.62702561571825,
"rotateFast": false
},
"reversed": false,
"folder": "Stage",
"previewStartingState": {
"rotation": 140.2190475453689,
"rotation": 145.31792694138463,
"velocity": 0
},
"useDefaultConstraints": true
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -840,15 +840,15 @@ private void prepareNamedCommands() {
pieceControl.noteToShootUsingSensorWhenReady(swerve::getPose, swerve::getRobotRelativeVelocity),
Commands.waitUntil(() -> !operator.getYButton()),
() -> !FieldConstants.IS_SIMULATION
).withTimeout(2.0)
).withTimeout(1.5)
)
);
NamedCommands.registerCommand("ShootInstantlyWhenReady2",
Commands.either(
pieceControl.noteToShootUsingSensorWhenReady(swerve::getPose, swerve::getRobotRelativeVelocity),
Commands.waitUntil(() -> !operator.getYButton()),
() -> !FieldConstants.IS_SIMULATION
)
).withTimeout(1.5)
);
NamedCommands.registerCommand("ShootWhenReady", pieceControl.shootPreload());
NamedCommands.registerCommand("RaiseElevator", elevator.toTopCommand());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/util/auto/PathPlannerStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ private Command generateCenterDefaultCommand(int i, int endingNote, boolean goin
.onlyIf(() -> !shooterSensor.getAsBoolean())),
NamedCommands.getCommand("PrepareSWD")
),
NamedCommands.getCommand("ShootInstantlyWhenReady")
NamedCommands.getCommand("ShootInstantlyWhenReady2")
),
commandGroup.getRequirements());
}
Expand All @@ -351,7 +351,7 @@ private Command generateCenterDefaultCommand(int i, int endingNote, boolean goin
.unless(shooterSensor)),
NamedCommands.getCommand("PrepareSWD")
),
NamedCommands.getCommand("ShootInstantlyWhenReady"),
NamedCommands.getCommand("ShootInstantlyWhenReady2"),
Commands.deadline(
AutoBuilder.followPath(getNoteAfterShot),
Commands.sequence(
Expand Down

0 comments on commit 47f4cde

Please sign in to comment.