Skip to content

Commit

Permalink
add jim auto
Browse files Browse the repository at this point in the history
  • Loading branch information
CJc318 authored and gordonbchen committed Apr 3, 2024
1 parent fb88f2a commit 8b663ae
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/main/deploy/pathplanner/autos/Jim auto.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.4662605074140238,
"y": 4.602358762492133
},
"rotation": 180.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "CloseAimShoot"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Jim"
}
},
{
"type": "named",
"data": {
"name": "SpitNotes"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "KillShooter"
}
}
]
}
},
"folder": "Source",
"choreoAuto": false
}
96 changes: 96 additions & 0 deletions src/main/deploy/pathplanner/paths/Jim.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 1.4662605074140238,
"y": 4.602358762492133
},
"prevControl": null,
"nextControl": {
"x": 2.6373441619921745,
"y": 1.8503121742334787
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.729005010078493,
"y": 0.7612043754757987
},
"prevControl": {
"x": 5.239716153483543,
"y": 0.786956420559745
},
"nextControl": {
"x": 6.3965226931880395,
"y": 0.7260718658384518
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.293678213604645,
"y": 0.7612043754757987
},
"prevControl": {
"x": 6.958642847385552,
"y": 0.7377827023842345
},
"nextControl": {
"x": 8.343670520705135,
"y": 0.7620814334951056
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.293678213604645,
"y": 7.436381206571257
},
"prevControl": {
"x": 8.293678213604645,
"y": 6.436381206571257
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [
{
"name": "New Constraints Zone",
"minWaypointRelativePos": 1.6500000000000001,
"maxWaypointRelativePos": 3.0,
"constraints": {
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 360.0,
"maxAngularAcceleration": 720.0
}
}
],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 360.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": -177.22978420279964,
"rotateFast": false
},
"reversed": false,
"folder": "Source",
"previewStartingState": {
"rotation": 180.0,
"velocity": 0
},
"useDefaultConstraints": true
}
10 changes: 10 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ public RobotContainer() {
NamedCommands.registerCommand("CloseAimShoot", new ZeroShoulder().andThen(new AimShoot(true)));
NamedCommands.registerCommand("KillShooter", new SetShooterVelocity(0.0, false));

NamedCommands.registerCommand(
"SpitNotes",
new ParallelCommandGroup(
new SetIntakeVelocity(4_000.0),
new SetFeederVelocity(3_000.0),
new SetShooterVelocity(3_600.0, false)
)
);

AutoBuilder.configureHolonomic(
m_drivetrain::getRobotPose2d,
m_drivetrain::setRobotPose2d,
Expand All @@ -111,6 +120,7 @@ public RobotContainer() {
autoChooser.addOption("Center upper auto", new PathPlannerAuto("Center upper 4-note"));
autoChooser.addOption("Center lower auto", new PathPlannerAuto("Center lower 4-note"));
autoChooser.addOption("Source auto", new PathPlannerAuto("Source auto"));
autoChooser.addOption("Jim auto", new PathPlannerAuto("Jim auto"));

SmartDashboard.putData("Auto chooser", autoChooser);

Expand Down

0 comments on commit 8b663ae

Please sign in to comment.