Skip to content

Commit

Permalink
[#29] - added paths for amp and all 3 stages
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeistHo committed Mar 9, 2024
1 parent abc2e33 commit 180a62e
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 1 deletion.
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/PathFind-AMP.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 2.245219347581553,
"y": 6.1716317718349725
},
"prevControl": null,
"nextControl": {
"x": 2.245219347581553,
"y": 6.244929061286695
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 1.7614572372001893,
"y": 7.388366776733554
},
"prevControl": {
"x": 1.7614572372001893,
"y": 7.327924283437372
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": -90.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": -88.92917554521306,
"velocity": 0
},
"useDefaultConstraints": true
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/PathFind-CENTER-STAGE.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 7.434667440763453,
"y": 4.1632860408577965
},
"prevControl": null,
"nextControl": {
"x": 6.434667440763453,
"y": 4.1632860408577965
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 6.305889183206938,
"y": 4.1632860408577965
},
"prevControl": {
"x": 6.452483762110382,
"y": 4.148626582967452
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 180.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 179.41134538376076,
"velocity": 0
},
"useDefaultConstraints": true
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/PathFind-HIGH-STAGE.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 3.5499110998222,
"y": 6.156972313944628
},
"prevControl": null,
"nextControl": {
"x": 3.6378678471642663,
"y": 6.039696650821874
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.136289415435974,
"y": 5.306723756304655
},
"prevControl": {
"x": 3.9457164628614976,
"y": 5.585253456221199
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": -58.495733280795754,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": -52.51998896228982,
"velocity": 0
},
"useDefaultConstraints": true
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/PathFind-LOW-STAGE.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 3.535251641931856,
"y": 1.9057295257447668
},
"prevControl": null,
"nextControl": {
"x": 4.12162995754563,
"y": 3.0784861569723145
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.092311041764941,
"y": 2.8879132043978375
},
"prevControl": {
"x": 4.092311041764941,
"y": 2.8732537465074937
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 60.75117366345304,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 65.6954507340633,
"velocity": 0
},
"useDefaultConstraints": true
}
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected void configureButtonBindings() {
// .deadlineWith(leds.enableState(LED_STATES.CHASING)));

new Trigger(driver::getRightBumper)
.whileTrue(new PathFindToAuton(PathPlannerPath.fromPathFile("C2-C1"), drivetrain, coPilot));
.whileTrue(new PathFindToAuton(PathPlannerPath.fromPathFile("PathFind-AMP"), drivetrain, driver));

// parks the robot
// new Trigger(driver::getXButton).whileTrue(new InstantCommand(() ->
Expand Down

0 comments on commit 180a62e

Please sign in to comment.