From e7fbc840cebbdcd33a63fe55fa1a04489bfb4699 Mon Sep 17 00:00:00 2001 From: NRGProgrammer Date: Thu, 21 Mar 2024 21:17:33 -0700 Subject: [PATCH] Created Mid Source Sweep auto routine. --- .pathplanner/settings.json | 4 +- .../pathplanner/autos/Mid Source Sweep.auto | 151 ++++++++++++++++++ .../Subwoofer Side to Mid Source Note.path | 92 +++++++++++ 3 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 src/main/deploy/pathplanner/autos/Mid Source Sweep.auto create mode 100644 src/main/deploy/pathplanner/paths/Subwoofer Side to Mid Source Note.path diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index 10c96ec..06c4cd2 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -7,8 +7,10 @@ "Drive Out", "Mid Amp Sweep", "Miscellaneous", + "Mid Source Sweep", "Source Sweep", - "Spike Sweep" + "Spike Sweep", + "The MOP" ], "autoFolders": [], "defaultMaxVel": 3.0, diff --git a/src/main/deploy/pathplanner/autos/Mid Source Sweep.auto b/src/main/deploy/pathplanner/autos/Mid Source Sweep.auto new file mode 100644 index 0000000..d6e60c2 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Mid Source Sweep.auto @@ -0,0 +1,151 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.74, + "y": 4.37 + }, + "rotation": -58.70990544835478 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "ShootSubwooferShot" + } + }, + { + "type": "path", + "data": { + "pathName": "Subwoofer Side to Mid Source Note" + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeUntilNoteDetected" + } + }, + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "Mid Source Note to Source Farshot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "AutoOrientToSpeaker" + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SetShooterContinuous" + } + }, + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + } + ] + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 1.5 + } + }, + { + "type": "named", + "data": { + "name": "ShootAtCurrentRPM" + } + } + ] + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "Source Farshot to Source Note" + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + }, + { + "type": "named", + "data": { + "name": "IntakeUntilNoteDetectedNoAutoCentering" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "Source Note to Source Farshot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "DisableAutoOrientationMode" + } + } + ] + } + } + ] + } + }, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Subwoofer Side to Mid Source Note.path b/src/main/deploy/pathplanner/paths/Subwoofer Side to Mid Source Note.path new file mode 100644 index 0000000..e953df5 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Subwoofer Side to Mid Source Note.path @@ -0,0 +1,92 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.74, + "y": 4.37 + }, + "prevControl": null, + "nextControl": { + "x": 1.1367330622701963, + "y": 2.955764486592587 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 5.147381694254483, + "y": 1.6293260067436164 + }, + "prevControl": { + "x": 3.5219561540185147, + "y": 1.6293260067436164 + }, + "nextControl": { + "x": 6.494708969061704, + "y": 1.6293260067436164 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 8.21, + "y": 2.4 + }, + "prevControl": { + "x": 7.654037089244662, + "y": 2.0157687134712696 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 1.1, + "rotationDegrees": 0.0, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [ + { + "name": "Intake", + "waypointRelativePos": 0, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeUntilNoteDetectedNoAutoCentering" + } + } + ] + } + } + } + ], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 24.95645435977526, + "rotateFast": false + }, + "reversed": false, + "folder": "Mid Source Sweep", + "previewStartingState": { + "rotation": -62.747370745004204, + "velocity": 0 + }, + "useDefaultConstraints": true +} \ No newline at end of file