Skip to content

Commit

Permalink
Refactor autonomous to use PathPlanner's auto builder framework
Browse files Browse the repository at this point in the history
- AutoBuilderSubsystem has been refactored to use PathPlanner auto builder
- Old auto paths were removed, one new PathPlanner auto has been added with two paths
- Three named commands were added for use in PathPlanner auto builder: shootSpeaker, handoff, resetFwd
  • Loading branch information
dslit3 authored and Momentum Robotics committed Mar 21, 2024
1 parent fc2126f commit c5afbfc
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
37 changes: 37 additions & 0 deletions src/main/deploy/pathplanner/autos/Shoot Center, Mobility.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.5089169846192605,
"y": 7.0
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "To Center Speaker"
}
},
{
"type": "named",
"data": {
"name": "shootSpeaker"
}
},
{
"type": "path",
"data": {
"pathName": "To Mobility Zone"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/Mobility A.path
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
"velocity": 0
},
"useDefaultConstraints": true
}
}
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/Mobility C.path
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
"velocity": 0
},
"useDefaultConstraints": true
}
}
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/Start A, Speaker C.path
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
"velocity": 0
},
"useDefaultConstraints": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public AutoBuilderSubsystem(PositioningSubsystem positioning, DriveSubsystem dri
.getEntry();

autoChooser = AutoBuilder.buildAutoChooser();
autoTab.add("PP Auto", autoChooser).withSize(4, 1).withPosition(0, 1);
autoTab.add("PP Auto", autoChooser).withSize(2, 1).withPosition(1, 1);

posePresetChooser = MoShuffleboard.enumToChooser(StartPosePreset.class);
posePresetChooser.onChange(preset -> this.flipAndSetStartPose(preset.pose));
Expand Down

0 comments on commit c5afbfc

Please sign in to comment.