From 699f68e39f02be311fe046342a79e8ce91c8a28b Mon Sep 17 00:00:00 2001 From: ShaneHopkins11 <97139604+ShaneHopkins11@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:54:45 -0500 Subject: [PATCH 1/5] auto --- .../deploy/pathplanner/paths/BL Path.path | 55 ++++--- .../deploy/pathplanner/paths/BR Path.path | 114 +-------------- .../deploy/pathplanner/paths/BRS Path.path | 71 +++++++++ .../deploy/pathplanner/paths/BS Path.path | 76 ++++++++++ .../deploy/pathplanner/paths/RL Path.path | 137 +----------------- .../deploy/pathplanner/paths/RR Path.path | 115 +++------------ .../deploy/pathplanner/paths/RS Path.path | 76 ++++++++++ 7 files changed, 291 insertions(+), 353 deletions(-) create mode 100644 src/main/deploy/pathplanner/paths/BRS Path.path create mode 100644 src/main/deploy/pathplanner/paths/BS Path.path create mode 100644 src/main/deploy/pathplanner/paths/RS Path.path diff --git a/src/main/deploy/pathplanner/paths/BL Path.path b/src/main/deploy/pathplanner/paths/BL Path.path index b6b1ee2..19e95c6 100644 --- a/src/main/deploy/pathplanner/paths/BL Path.path +++ b/src/main/deploy/pathplanner/paths/BL Path.path @@ -16,53 +16,70 @@ }, { "anchor": { - "x": 2.86891037330523, - "y": 6.318561490543663 + "x": 1.3707054194735169, + "y": 6.653973877748326 }, "prevControl": { - "x": 1.86891037330523, - "y": 6.318561490543663 + "x": 1.376037951044251, + "y": 6.637060000640769 }, "nextControl": { - "x": 3.868910373305229, - "y": 6.318561490543663 + "x": 1.3653728879027827, + "y": 6.670887754855883 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 5.175837629100388, - "y": 6.518552051996682 + "x": 1.3707054194735169, + "y": 7.226987445427883 }, "prevControl": { - "x": 5.711521937502425, - "y": 6.5084845171724846 + "x": 1.1642815147026928, + "y": 6.88294760414318 }, "nextControl": { - "x": 4.640153320698351, - "y": 6.52861958682088 + "x": 1.4057878828008366, + "y": 7.285458217640082 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 4.5393891577171175, - "y": 7.256243723540236 + "x": 4.867257597763059, + "y": 6.653973877748326 }, "prevControl": { - "x": 5.3367389307207, - "y": 7.748303518762803 + "x": 4.8555634433206185, + "y": 6.665668032190766 }, "nextControl": null, "isLocked": false, "linkedName": null } ], - "rotationTargets": [], + "rotationTargets": [ + { + "waypointRelativePos": 2, + "rotationDegrees": -90.0, + "rotateFast": false + } + ], "constraintZones": [], - "eventMarkers": [], + "eventMarkers": [ + { + "name": "DUMP", + "waypointRelativePos": 1.0, + "command": { + "type": "parallel", + "data": { + "commands": [] + } + } + } + ], "globalConstraints": { "maxVelocity": 3.0, "maxAcceleration": 3.0, @@ -71,7 +88,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 0, + "rotation": -10.619655276155145, "rotateFast": false }, "reversed": false, diff --git a/src/main/deploy/pathplanner/paths/BR Path.path b/src/main/deploy/pathplanner/paths/BR Path.path index d9c396f..921f65f 100644 --- a/src/main/deploy/pathplanner/paths/BR Path.path +++ b/src/main/deploy/pathplanner/paths/BR Path.path @@ -16,121 +16,21 @@ }, { "anchor": { - "x": 8.132296423664028, - "y": 0.7546028588874307 + "x": 3.4343764649524573, + "y": 1.2674685681912936 }, "prevControl": { - "x": 8.143311036862226, - "y": 0.7414691727524798 - }, - "nextControl": { - "x": 8.127372159692236, - "y": 0.7604744892649515 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.077821518634936, - "y": 2.4888707299839377 - }, - "prevControl": { - "x": 4.102124575342902, - "y": 2.4781954601524956 - }, - "nextControl": { - "x": 4.05351846192697, - "y": 2.4995459998153797 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.85424206388054, - "y": 2.364017858822755 - }, - "prevControl": { - "x": 6.1573277407348606, - "y": 0.5103986326774224 - }, - "nextControl": { - "x": 8.296866309155071, - "y": 2.847517113798695 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.077821518634936, - "y": 2.4888707299839377 - }, - "prevControl": { - "x": 7.949753485010445, - "y": -0.9398236618377163 + "x": 3.4733754978198816, + "y": 1.238219293540726 }, "nextControl": null, "isLocked": false, "linkedName": null } ], - "rotationTargets": [ - { - "waypointRelativePos": 1.1500000000000001, - "rotationDegrees": -8.347973957817544, - "rotateFast": false - }, - { - "waypointRelativePos": 1.5, - "rotationDegrees": -21.34372369731459, - "rotateFast": false - }, - { - "waypointRelativePos": 2.0, - "rotationDegrees": -30.94563386049108, - "rotateFast": false - }, - { - "waypointRelativePos": 3.0, - "rotationDegrees": 6.2824899769979226, - "rotateFast": false - } - ], + "rotationTargets": [], "constraintZones": [], - "eventMarkers": [ - { - "name": "SUCK", - "waypointRelativePos": 1.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "DUMP", - "waypointRelativePos": 2.05, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "SUCK", - "waypointRelativePos": 3.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - } - ], + "eventMarkers": [], "globalConstraints": { "maxVelocity": 3.0, "maxAcceleration": 3.0, @@ -139,7 +39,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -28.78265773519998, + "rotation": -1.080924186660749, "rotateFast": false }, "reversed": false, diff --git a/src/main/deploy/pathplanner/paths/BRS Path.path b/src/main/deploy/pathplanner/paths/BRS Path.path new file mode 100644 index 0000000..67326cf --- /dev/null +++ b/src/main/deploy/pathplanner/paths/BRS Path.path @@ -0,0 +1,71 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.7336934388833163, + "y": 4.3678916811515345 + }, + "prevControl": null, + "nextControl": { + "x": 0.7336934388833163, + "y": 4.377641439368391 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.5373987090016947, + "y": 2.798180608237701 + }, + "prevControl": { + "x": 2.5306842402183825, + "y": 2.837394114455362 + }, + "nextControl": { + "x": 2.539248412973217, + "y": 2.787378059215745 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 4.770093340661742, + "y": 1.823204786552092 + }, + "prevControl": { + "x": 4.779843098878597, + "y": 1.813455028335237 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 1, + "rotationDegrees": -24.67686317033704, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 5.0, + "maxAcceleration": 5.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": -27.645975363738785, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/BS Path.path b/src/main/deploy/pathplanner/paths/BS Path.path new file mode 100644 index 0000000..df960c6 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/BS Path.path @@ -0,0 +1,76 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 1.3674277229789629, + "y": 5.557362183607978 + }, + "prevControl": null, + "nextControl": { + "x": 1.4259262722800996, + "y": 5.57686170004169 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.4691504014837022, + "y": 6.27884429165533 + }, + "prevControl": { + "x": 2.4886499179174146, + "y": 6.298343808089042 + }, + "nextControl": { + "x": 2.44965088504999, + "y": 6.259344775221619 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 4.019361957963822, + "y": 6.27884429165533 + }, + "prevControl": { + "x": 3.2150069050731935, + "y": 6.244720137896334 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [ + { + "name": "shoot", + "waypointRelativePos": 0, + "command": { + "type": "parallel", + "data": { + "commands": [] + } + } + } + ], + "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": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/RL Path.path b/src/main/deploy/pathplanner/paths/RL Path.path index 62197ed..7d07639 100644 --- a/src/main/deploy/pathplanner/paths/RL Path.path +++ b/src/main/deploy/pathplanner/paths/RL Path.path @@ -16,146 +16,21 @@ }, { "anchor": { - "x": 8.764251056422667, - "y": 0.7885902086146953 + "x": 13.700871867301933, + "y": 1.1992202606733011 }, "prevControl": { - "x": 8.778645101067278, - "y": 0.777772446853647 - }, - "nextControl": { - "x": 8.749857011778056, - "y": 0.7994079703757436 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 12.81450131968361, - "y": 2.531603357256733 - }, - "prevControl": { - "x": 12.509733268596582, - "y": 1.30174639313019 - }, - "nextControl": { - "x": 12.81645808941861, - "y": 2.5394996799756004 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.764251056422667, - "y": 2.430613727257548 - }, - "prevControl": { - "x": 11.312199035854505, - "y": 0.43305686524187537 - }, - "nextControl": { - "x": 8.579195135364564, - "y": 2.575695074267103 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 14.016841975522329, - "y": 2.8583835270931157 - }, - "prevControl": { - "x": 12.511861827396526, - "y": 0.6159134276419227 + "x": 13.716393538454641, + "y": 1.1975158911190236 }, "nextControl": null, "isLocked": false, "linkedName": null } ], - "rotationTargets": [ - { - "waypointRelativePos": 0.0, - "rotationDegrees": -179.27908921595682, - "rotateFast": false - }, - { - "waypointRelativePos": 1.0, - "rotationDegrees": -173.12026690331754, - "rotateFast": false - }, - { - "waypointRelativePos": 2.0, - "rotationDegrees": -153.1337761657031, - "rotateFast": false - }, - { - "waypointRelativePos": 3.0, - "rotationDegrees": 179.9681226505627, - "rotateFast": false - }, - { - "waypointRelativePos": 3.6, - "rotationDegrees": -92.59528426053396, - "rotateFast": false - } - ], + "rotationTargets": [], "constraintZones": [], - "eventMarkers": [ - { - "name": "DUMP", - "waypointRelativePos": 0.35, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "SUCK", - "waypointRelativePos": 1.05, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "DUMP", - "waypointRelativePos": 2.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "SUCK", - "waypointRelativePos": 3.05, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "END", - "waypointRelativePos": 4.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - } - ], + "eventMarkers": [], "globalConstraints": { "maxVelocity": 3.0, "maxAcceleration": 3.0, diff --git a/src/main/deploy/pathplanner/paths/RR Path.path b/src/main/deploy/pathplanner/paths/RR Path.path index bc02da2..dc7e143 100644 --- a/src/main/deploy/pathplanner/paths/RR Path.path +++ b/src/main/deploy/pathplanner/paths/RR Path.path @@ -3,73 +3,41 @@ "waypoints": [ { "anchor": { - "x": 15.66262990699729, - "y": 7.053879628082199 + "x": 16.01178678140832, + "y": 7.028186819906402 }, "prevControl": null, "nextControl": { - "x": 15.67793066314857, - "y": 7.0257277213732925 + "x": 16.023480935850756, + "y": 7.014188166173047 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 14.078577603766352, - "y": 6.953538586837812 + "x": 15.436328829902315, + "y": 7.244070355124084 }, "prevControl": { - "x": 14.101505128134388, - "y": 6.942041679898264 + "x": 15.349776704172188, + "y": 6.606731974747315 }, "nextControl": { - "x": 14.06381501854095, - "y": 6.9609412207113674 + "x": 15.438773213728762, + "y": 7.262069908755202 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 14.078577603766352, - "y": 7.053879628082199 + "x": 12.11763335207582, + "y": 6.7241388044029655 }, "prevControl": { - "x": 14.092380760134239, - "y": 7.041158844791963 - }, - "nextControl": { - "x": 14.064774447398465, - "y": 7.066600411372435 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.89520288878197, - "y": 7.3965339844750195 - }, - "prevControl": { - "x": 8.88347015500255, - "y": 7.419864480151842 - }, - "nextControl": { - "x": 9.724449127207897, - "y": 5.747581051224825 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 14.078577603766352, - "y": 7.053879628082199 - }, - "prevControl": { - "x": 14.114679594083759, - "y": 7.052137067739439 + "x": 12.127383110292678, + "y": 6.704639287969254 }, "nextControl": null, "isLocked": false, @@ -78,61 +46,16 @@ ], "rotationTargets": [ { - "waypointRelativePos": 0.8999999999999999, - "rotationDegrees": 179.87414120578404, - "rotateFast": false - }, - { - "waypointRelativePos": 2.0, - "rotationDegrees": -90.16470187578516, - "rotateFast": false - }, - { - "waypointRelativePos": 3.0, - "rotationDegrees": -179.5047311187391, - "rotateFast": false - }, - { - "waypointRelativePos": 4.0, - "rotationDegrees": -90.45212928881924, + "waypointRelativePos": 1.0, + "rotationDegrees": -90.0, "rotateFast": false } ], "constraintZones": [], "eventMarkers": [ { - "name": "SUCK", - "waypointRelativePos": 0.95, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "DUMP", - "waypointRelativePos": 2.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "SUCK", - "waypointRelativePos": 3.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - }, - { - "name": "DUMP", - "waypointRelativePos": 4.0, + "name": "dump", + "waypointRelativePos": 1.0, "command": { "type": "parallel", "data": { @@ -149,7 +72,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -89.61755681902692, + "rotation": 177.70853022836093, "rotateFast": false }, "reversed": false, diff --git a/src/main/deploy/pathplanner/paths/RS Path.path b/src/main/deploy/pathplanner/paths/RS Path.path new file mode 100644 index 0000000..ae654f9 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/RS Path.path @@ -0,0 +1,76 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 15.146419352667763, + "y": 5.578111669043852 + }, + "prevControl": null, + "nextControl": { + "x": 15.158113507110203, + "y": 5.589805823486293 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 14.24596946059989, + "y": 6.209596008935608 + }, + "prevControl": { + "x": 14.23427530615745, + "y": 6.221290163378046 + }, + "nextControl": { + "x": 14.257663615042329, + "y": 6.19790185449317 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 11.801891182129943, + "y": 6.326537553360007 + }, + "prevControl": { + "x": 11.801891182129943, + "y": 6.338231707802448 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [ + { + "name": "shoot", + "waypointRelativePos": 0, + "command": { + "type": "parallel", + "data": { + "commands": [] + } + } + } + ], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file From 2b81dd5c9855f076fc8fa8fe1e35920ca6fa7378 Mon Sep 17 00:00:00 2001 From: ShaneHopkins11 <97139604+ShaneHopkins11@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:54:03 -0500 Subject: [PATCH 2/5] paths --- .../deploy/pathplanner/autos/BS Auto.auto | 43 +++++++++++ .../deploy/pathplanner/autos/RS Auto.auto | 43 +++++++++++ .../deploy/pathplanner/paths/BL Path.path | 30 ++++---- .../deploy/pathplanner/paths/BRS Path.path | 71 ------------------- .../deploy/pathplanner/paths/RS Path.path | 12 +++- 5 files changed, 112 insertions(+), 87 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/BS Auto.auto create mode 100644 src/main/deploy/pathplanner/autos/RS Auto.auto delete mode 100644 src/main/deploy/pathplanner/paths/BRS Path.path diff --git a/src/main/deploy/pathplanner/autos/BS Auto.auto b/src/main/deploy/pathplanner/autos/BS Auto.auto new file mode 100644 index 0000000..0b8117f --- /dev/null +++ b/src/main/deploy/pathplanner/autos/BS Auto.auto @@ -0,0 +1,43 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.3674277229789629, + "y": 5.557362183607978 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "BS Path" + } + }, + { + "type": "named", + "data": { + "name": "shootConveyor" + } + }, + { + "type": "named", + "data": { + "name": "shootFlyWheel" + } + }, + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + } + ] + } + }, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/RS Auto.auto b/src/main/deploy/pathplanner/autos/RS Auto.auto new file mode 100644 index 0000000..720e4f6 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/RS Auto.auto @@ -0,0 +1,43 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.146419352667763, + "y": 5.578111669043852 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "RS Path" + } + }, + { + "type": "named", + "data": { + "name": "shootConveyor" + } + }, + { + "type": "named", + "data": { + "name": "shootFlyWheel" + } + }, + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + } + ] + } + }, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/BL Path.path b/src/main/deploy/pathplanner/paths/BL Path.path index 19e95c6..a2fbddb 100644 --- a/src/main/deploy/pathplanner/paths/BL Path.path +++ b/src/main/deploy/pathplanner/paths/BL Path.path @@ -3,28 +3,28 @@ "waypoints": [ { "anchor": { - "x": 1.1057381983470564, - "y": 6.994425860528696 + "x": 0.71583277069688, + "y": 7.110045901003483 }, "prevControl": null, "nextControl": { - "x": 2.1057381983470567, - "y": 6.994425860528696 + "x": 0.71583277069688, + "y": 7.098351746561043 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 1.3707054194735169, + "x": 1.4759528094554764, "y": 6.653973877748326 }, "prevControl": { - "x": 1.376037951044251, + "x": 1.4812853410262106, "y": 6.637060000640769 }, "nextControl": { - "x": 1.3653728879027827, + "x": 1.4706202778847421, "y": 6.670887754855883 }, "isLocked": false, @@ -32,16 +32,16 @@ }, { "anchor": { - "x": 1.3707054194735169, - "y": 7.226987445427883 + "x": 1.4759528094554764, + "y": 7.3322348354098414 }, "prevControl": { - "x": 1.1642815147026928, - "y": 6.88294760414318 + "x": 1.2695289046846523, + "y": 6.988194994125138 }, "nextControl": { - "x": 1.4057878828008366, - "y": 7.285458217640082 + "x": 1.511035272782796, + "y": 7.39070560762204 }, "isLocked": false, "linkedName": null @@ -71,7 +71,7 @@ "eventMarkers": [ { "name": "DUMP", - "waypointRelativePos": 1.0, + "waypointRelativePos": 2.0, "command": { "type": "parallel", "data": { @@ -94,7 +94,7 @@ "reversed": false, "folder": null, "previewStartingState": { - "rotation": -91.11576892507215, + "rotation": 0.0, "velocity": 0 }, "useDefaultConstraints": true diff --git a/src/main/deploy/pathplanner/paths/BRS Path.path b/src/main/deploy/pathplanner/paths/BRS Path.path deleted file mode 100644 index 67326cf..0000000 --- a/src/main/deploy/pathplanner/paths/BRS Path.path +++ /dev/null @@ -1,71 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 0.7336934388833163, - "y": 4.3678916811515345 - }, - "prevControl": null, - "nextControl": { - "x": 0.7336934388833163, - "y": 4.377641439368391 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.5373987090016947, - "y": 2.798180608237701 - }, - "prevControl": { - "x": 2.5306842402183825, - "y": 2.837394114455362 - }, - "nextControl": { - "x": 2.539248412973217, - "y": 2.787378059215745 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.770093340661742, - "y": 1.823204786552092 - }, - "prevControl": { - "x": 4.779843098878597, - "y": 1.813455028335237 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 1, - "rotationDegrees": -24.67686317033704, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 5.0, - "maxAcceleration": 5.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -27.645975363738785, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/RS Path.path b/src/main/deploy/pathplanner/paths/RS Path.path index ae654f9..0d86dd1 100644 --- a/src/main/deploy/pathplanner/paths/RS Path.path +++ b/src/main/deploy/pathplanner/paths/RS Path.path @@ -48,7 +48,17 @@ "constraintZones": [], "eventMarkers": [ { - "name": "shoot", + "name": "shootConveyor", + "waypointRelativePos": 0, + "command": { + "type": "parallel", + "data": { + "commands": [] + } + } + }, + { + "name": "shootFlyWheel", "waypointRelativePos": 0, "command": { "type": "parallel", From d103f55bbce250bce18877fb9b8aa22c534bc2af Mon Sep 17 00:00:00 2001 From: ShaneHopkins11 <97139604+ShaneHopkins11@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:28:49 -0500 Subject: [PATCH 3/5] Update BL Path.path --- src/main/deploy/pathplanner/paths/BL Path.path | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/deploy/pathplanner/paths/BL Path.path b/src/main/deploy/pathplanner/paths/BL Path.path index a2fbddb..f3b64b6 100644 --- a/src/main/deploy/pathplanner/paths/BL Path.path +++ b/src/main/deploy/pathplanner/paths/BL Path.path @@ -81,8 +81,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 1.0, + "maxAcceleration": 1.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, @@ -97,5 +97,5 @@ "rotation": 0.0, "velocity": 0 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file From cb7e6e20e9e84b65dd8d1f61a95e32eb968a1cc1 Mon Sep 17 00:00:00 2001 From: Garrett Summerfield Date: Tue, 19 Mar 2024 12:19:39 -0500 Subject: [PATCH 4/5] Add startingPose to some of the PathPlanners Paths now reset to the starting position of the path, rather than just being null. Updated Javadocs for the getAutonomousCommand in the swerve subsystem. --- src/main/deploy/pathplanner/autos/BL Path.auto | 8 +++++++- src/main/deploy/pathplanner/autos/BR Path.auto | 8 +++++++- src/main/deploy/pathplanner/autos/RL Path.auto | 8 +++++++- src/main/deploy/pathplanner/autos/RR Path.auto | 8 +++++++- .../frc/robot/subsystems/swervedrive/SwerveSubsystem.java | 6 ++---- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/BL Path.auto b/src/main/deploy/pathplanner/autos/BL Path.auto index 804102a..00d23e6 100644 --- a/src/main/deploy/pathplanner/autos/BL Path.auto +++ b/src/main/deploy/pathplanner/autos/BL Path.auto @@ -1,6 +1,12 @@ { "version": 1.0, - "startingPose": null, + "startingPose": { + "position": { + "x": 0.71583277069688, + "y": 7.110045901003483 + }, + "rotation": 0 + }, "command": { "type": "sequential", "data": { diff --git a/src/main/deploy/pathplanner/autos/BR Path.auto b/src/main/deploy/pathplanner/autos/BR Path.auto index 3f024f4..f70a47e 100644 --- a/src/main/deploy/pathplanner/autos/BR Path.auto +++ b/src/main/deploy/pathplanner/autos/BR Path.auto @@ -1,6 +1,12 @@ { "version": 1.0, - "startingPose": null, + "startingPose": { + "position": { + "x": 1.107671952684762, + "y": 2.4888707299839377 + }, + "rotation": 0 + }, "command": { "type": "sequential", "data": { diff --git a/src/main/deploy/pathplanner/autos/RL Path.auto b/src/main/deploy/pathplanner/autos/RL Path.auto index e70b182..60d48cd 100644 --- a/src/main/deploy/pathplanner/autos/RL Path.auto +++ b/src/main/deploy/pathplanner/autos/RL Path.auto @@ -1,6 +1,12 @@ { "version": 1.0, - "startingPose": null, + "startingPose": { + "position": { + "x": 15.541771563143822, + "y": 2.430613727257548 + }, + "rotation": -179.1864566650106 + }, "command": { "type": "sequential", "data": { diff --git a/src/main/deploy/pathplanner/autos/RR Path.auto b/src/main/deploy/pathplanner/autos/RR Path.auto index 825fbfa..17d59b9 100644 --- a/src/main/deploy/pathplanner/autos/RR Path.auto +++ b/src/main/deploy/pathplanner/autos/RR Path.auto @@ -1,6 +1,12 @@ { "version": 1.0, - "startingPose": null, + "startingPose": { + "position": { + "x": 16.01178678140832, + "y": 7.028186819906402 + }, + "rotation": 180.0 + }, "command": { "type": "sequential", "data": { diff --git a/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java b/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java index 567b6a2..2b7f711 100644 --- a/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java @@ -7,7 +7,6 @@ import com.pathplanner.lib.auto.AutoBuilder; import com.pathplanner.lib.commands.PathPlannerAuto; import com.pathplanner.lib.path.PathConstraints; -import com.pathplanner.lib.path.PathPlannerPath; import com.pathplanner.lib.util.HolonomicPathFollowerConfig; import com.pathplanner.lib.util.PIDConstants; import com.pathplanner.lib.util.ReplanningConfig; @@ -131,9 +130,8 @@ public void setupPathPlanner() { /** * Get the path follower with events. * - * @param pathName PathPlanner path name. - * @param setOdomToStart Set the odometry position to the start of the path. - * @return {@link AutoBuilder#followPath(PathPlannerPath)} path command. + * @param pathName Name of the path to follow. + * @return PathPlannerPath with events. */ public Command getAutonomousCommand(String pathName) { // Load the path you want to follow using its name in the GUI From e20633a3bf26554c3c14576312184ea408c8b957 Mon Sep 17 00:00:00 2001 From: ShaneHopkins11 <97139604+ShaneHopkins11@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:31:36 -0500 Subject: [PATCH 5/5] fixed paths --- .../deploy/pathplanner/autos/BL Path.auto | 19 ---- .../deploy/pathplanner/autos/BS Auto.auto | 2 +- .../deploy/pathplanner/autos/RR Path.auto | 19 ---- .../deploy/pathplanner/autos/bl Auto.auto | 55 ++++++++++ .../deploy/pathplanner/autos/rr Auto.auto | 55 ++++++++++ .../deploy/pathplanner/paths/BL Path.path | 101 ------------------ .../deploy/pathplanner/paths/RR Path.path | 55 ++-------- .../deploy/pathplanner/paths/bl2 Path.path | 71 ++++++++++++ .../deploy/pathplanner/paths/rr2 Path.path | 65 +++++++++++ 9 files changed, 258 insertions(+), 184 deletions(-) delete mode 100644 src/main/deploy/pathplanner/autos/BL Path.auto delete mode 100644 src/main/deploy/pathplanner/autos/RR Path.auto create mode 100644 src/main/deploy/pathplanner/autos/bl Auto.auto create mode 100644 src/main/deploy/pathplanner/autos/rr Auto.auto delete mode 100644 src/main/deploy/pathplanner/paths/BL Path.path create mode 100644 src/main/deploy/pathplanner/paths/bl2 Path.path create mode 100644 src/main/deploy/pathplanner/paths/rr2 Path.path diff --git a/src/main/deploy/pathplanner/autos/BL Path.auto b/src/main/deploy/pathplanner/autos/BL Path.auto deleted file mode 100644 index 804102a..0000000 --- a/src/main/deploy/pathplanner/autos/BL Path.auto +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": 1.0, - "startingPose": null, - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "BL Path" - } - } - ] - } - }, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/BS Auto.auto b/src/main/deploy/pathplanner/autos/BS Auto.auto index 0b8117f..4dd5075 100644 --- a/src/main/deploy/pathplanner/autos/BS Auto.auto +++ b/src/main/deploy/pathplanner/autos/BS Auto.auto @@ -2,7 +2,7 @@ "version": 1.0, "startingPose": { "position": { - "x": 1.3674277229789629, + "x": 16.29244648802688, "y": 5.557362183607978 }, "rotation": 0 diff --git a/src/main/deploy/pathplanner/autos/RR Path.auto b/src/main/deploy/pathplanner/autos/RR Path.auto deleted file mode 100644 index 825fbfa..0000000 --- a/src/main/deploy/pathplanner/autos/RR Path.auto +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": 1.0, - "startingPose": null, - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "RR Path" - } - } - ] - } - }, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/bl Auto.auto b/src/main/deploy/pathplanner/autos/bl Auto.auto new file mode 100644 index 0000000..e161d3a --- /dev/null +++ b/src/main/deploy/pathplanner/autos/bl Auto.auto @@ -0,0 +1,55 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.4217011759439209, + "y": 7.400066486593781 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "bl Path" + } + }, + { + "type": "named", + "data": { + "name": "shootConveyor" + } + }, + { + "type": "named", + "data": { + "name": "shootFlyWheel" + } + }, + { + "type": "named", + "data": { + "name": "dumpBed" + } + }, + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + }, + { + "type": "path", + "data": { + "pathName": "bl2 Path" + } + } + ] + } + }, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/rr Auto.auto b/src/main/deploy/pathplanner/autos/rr Auto.auto new file mode 100644 index 0000000..37da37c --- /dev/null +++ b/src/main/deploy/pathplanner/autos/rr Auto.auto @@ -0,0 +1,55 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 16.1521166347176, + "y": 7.390705607622041 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "rr Path" + } + }, + { + "type": "named", + "data": { + "name": "shootConveyor" + } + }, + { + "type": "named", + "data": { + "name": "shootFlyWheel" + } + }, + { + "type": "named", + "data": { + "name": "dumpBed" + } + }, + { + "type": "wait", + "data": { + "waitTime": 2.0 + } + }, + { + "type": "path", + "data": { + "pathName": "rr2 Path" + } + } + ] + } + }, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/BL Path.path b/src/main/deploy/pathplanner/paths/BL Path.path deleted file mode 100644 index f3b64b6..0000000 --- a/src/main/deploy/pathplanner/paths/BL Path.path +++ /dev/null @@ -1,101 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 0.71583277069688, - "y": 7.110045901003483 - }, - "prevControl": null, - "nextControl": { - "x": 0.71583277069688, - "y": 7.098351746561043 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.4759528094554764, - "y": 6.653973877748326 - }, - "prevControl": { - "x": 1.4812853410262106, - "y": 6.637060000640769 - }, - "nextControl": { - "x": 1.4706202778847421, - "y": 6.670887754855883 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.4759528094554764, - "y": 7.3322348354098414 - }, - "prevControl": { - "x": 1.2695289046846523, - "y": 6.988194994125138 - }, - "nextControl": { - "x": 1.511035272782796, - "y": 7.39070560762204 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.867257597763059, - "y": 6.653973877748326 - }, - "prevControl": { - "x": 4.8555634433206185, - "y": 6.665668032190766 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 2, - "rotationDegrees": -90.0, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [ - { - "name": "DUMP", - "waypointRelativePos": 2.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 1.0, - "maxAcceleration": 1.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -10.619655276155145, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 0.0, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/RR Path.path b/src/main/deploy/pathplanner/paths/RR Path.path index dc7e143..b566cec 100644 --- a/src/main/deploy/pathplanner/paths/RR Path.path +++ b/src/main/deploy/pathplanner/paths/RR Path.path @@ -3,67 +3,34 @@ "waypoints": [ { "anchor": { - "x": 16.01178678140832, - "y": 7.028186819906402 + "x": 16.128728325832714, + "y": 7.414093916506922 }, "prevControl": null, "nextControl": { - "x": 16.023480935850756, - "y": 7.014188166173047 + "x": 16.128728325832714, + "y": 7.414093916506922 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 15.436328829902315, - "y": 7.244070355124084 + "x": 15.052866117128234, + "y": 7.414093916506922 }, "prevControl": { - "x": 15.349776704172188, - "y": 6.606731974747315 - }, - "nextControl": { - "x": 15.438773213728762, - "y": 7.262069908755202 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 12.11763335207582, - "y": 6.7241388044029655 - }, - "prevControl": { - "x": 12.127383110292678, - "y": 6.704639287969254 + "x": 15.25166674264972, + "y": 5.496252587946771 }, "nextControl": null, "isLocked": false, "linkedName": null } ], - "rotationTargets": [ - { - "waypointRelativePos": 1.0, - "rotationDegrees": -90.0, - "rotateFast": false - } - ], + "rotationTargets": [], "constraintZones": [], - "eventMarkers": [ - { - "name": "dump", - "waypointRelativePos": 1.0, - "command": { - "type": "parallel", - "data": { - "commands": [] - } - } - } - ], + "eventMarkers": [], "globalConstraints": { "maxVelocity": 3.0, "maxAcceleration": 3.0, @@ -72,7 +39,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 177.70853022836093, + "rotation": -90.0, "rotateFast": false }, "reversed": false, diff --git a/src/main/deploy/pathplanner/paths/bl2 Path.path b/src/main/deploy/pathplanner/paths/bl2 Path.path new file mode 100644 index 0000000..ee7d98b --- /dev/null +++ b/src/main/deploy/pathplanner/paths/bl2 Path.path @@ -0,0 +1,71 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 1.52342385444866, + "y": 7.390316728376925 + }, + "prevControl": null, + "nextControl": { + "x": 2.5081494343531894, + "y": 7.0783244654413116 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.4106518521846283, + "y": 6.337342840960248 + }, + "prevControl": { + "x": 2.4301513686183416, + "y": 6.3470925991771034 + }, + "nextControl": { + "x": 2.391152335750915, + "y": 6.327593082743392 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 3.5026247724725117, + "y": 6.337342840960248 + }, + "prevControl": { + "x": 2.4106518521846274, + "y": 6.3470925991771034 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.95, + "rotationDegrees": -90.60054724312275, + "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": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/rr2 Path.path b/src/main/deploy/pathplanner/paths/rr2 Path.path new file mode 100644 index 0000000..fcfdd2b --- /dev/null +++ b/src/main/deploy/pathplanner/paths/rr2 Path.path @@ -0,0 +1,65 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 15.052866117129224, + "y": 7.414093916500834 + }, + "prevControl": null, + "nextControl": { + "x": 15.041171962687761, + "y": 7.4374822253796244 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 14.175804533946229, + "y": 6.303149244469041 + }, + "prevControl": { + "x": 14.175804533947208, + "y": 6.291455090020513 + }, + "nextControl": { + "x": 14.17580453394525, + "y": 6.314843398917569 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 12.176104124289, + "y": 6.303149244469041 + }, + "prevControl": { + "x": 13.076554016356384, + "y": 6.273913858365985 + }, + "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.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file