Skip to content

Commit

Permalink
Integrate PathPlanner and Test Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Java4First committed Mar 12, 2024
1 parent 575f153 commit 65bbce9
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .pathplanner/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"robotWidth": 0.9,
"robotLength": 0.9,
"holonomicMode": true,
"pathFolders": [],
"autoFolders": [],
"defaultMaxVel": 3.0,
"defaultMaxAccel": 3.0,
"defaultMaxAngVel": 540.0,
"defaultMaxAngAccel": 720.0,
"maxModuleSpeed": 4.5
}
25 changes: 25 additions & 0 deletions src/main/deploy/pathplanner/autos/Stu Auto.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.500743858630575,
"y": 7.329728945172176
},
"rotation": 0.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "1+Curve-Around"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
10 changes: 5 additions & 5 deletions src/main/deploy/pathplanner/navgrid.json
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@
false,
false,
false,
false,
true,
false,
false,
false,
Expand Down Expand Up @@ -1400,10 +1400,10 @@
[
true,
true,
false,
false,
false,
false,
true,
true,
true,
true,
false,
false,
false,
Expand Down
122 changes: 122 additions & 0 deletions src/main/deploy/pathplanner/paths/1+Curve-Around.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 0.500743858630575,
"y": 7.329728945172176
},
"prevControl": null,
"nextControl": {
"x": 1.50074385863058,
"y": 7.329728945172176
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.895424362277296,
"y": 7.329728945172176
},
"prevControl": {
"x": 5.046754236365618,
"y": 7.329728945172176
},
"nextControl": {
"x": 6.7440944881889715,
"y": 7.329728945172176
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.307235353209444,
"y": 5.768694780632805
},
"prevControl": {
"x": 8.307235353209444,
"y": 6.221685236163265
},
"nextControl": {
"x": 8.307235353209444,
"y": 5.315985366285406
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.307235353209444,
"y": 2.449846341134125
},
"prevControl": {
"x": 8.307235353209444,
"y": 3.207912001409589
},
"nextControl": {
"x": 8.307235353209444,
"y": 1.6297106276905273
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.895424362277296,
"y": 1.0538961618463785
},
"prevControl": {
"x": 7.883830840764359,
"y": 1.6848471534780896
},
"nextControl": {
"x": 3.907017883790232,
"y": 0.4229451702146654
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.3628912122689107,
"y": 1.0538961618463785
},
"prevControl": {
"x": 1.3628912122689107,
"y": 1.0538961618463785
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [
{
"waypointRelativePos": 4,
"rotationDegrees": 180.0,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 0,
"velocity": 0
},
"useDefaultConstraints": true
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/1+Straight-to-Line.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 0.500743858630575,
"y": 7.329728945172176
},
"prevControl": null,
"nextControl": {
"x": 1.50074385863058,
"y": 7.329728945172176
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.895424362277296,
"y": 7.329728945172176
},
"prevControl": {
"x": 4.895424362277296,
"y": 7.329728945172176
},
"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": 0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 0,
"velocity": 0
},
"useDefaultConstraints": true
}
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package frc.robot;

import com.pathplanner.lib.commands.PathPlannerAuto;
import edu.wpi.first.wpilibj.GenericHID;
import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj2.command.Command;
Expand Down Expand Up @@ -221,6 +222,6 @@ private void configureButtonBindings() {
* @return the command to run in autonomous
*/
public Command getAutonomousCommand() {
return null;
return new PathPlannerAuto("Stu Auto");
}
}

0 comments on commit 65bbce9

Please sign in to comment.