From: maxwtan <100314265+MaxwellTTan20@users.noreply.github.com> Date: Mon, 16 Feb 2026 20:10:35 +0000 (-0800) Subject: revert X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=27f7890065e1e83bc23a2264895422178f904bab;p=FRC2026.git revert --- diff --git a/src/main/deploy/pathplanner/autos/New Auto.auto b/src/main/deploy/pathplanner/autos/New Auto.auto deleted file mode 100644 index d868554..0000000 --- a/src/main/deploy/pathplanner/autos/New Auto.auto +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Testing aim while going back and forth" - } - } - ] - } - }, - "resetOdom": true, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Testing Over the Bump.auto b/src/main/deploy/pathplanner/autos/Testing Over the Bump.auto deleted file mode 100644 index e3097d1..0000000 --- a/src/main/deploy/pathplanner/autos/Testing Over the Bump.auto +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Over the bump diagonal" - } - } - ] - } - }, - "resetOdom": true, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/navgrid.json b/src/main/deploy/pathplanner/navgrid.json index ac5f521..23e0db9 100644 --- a/src/main/deploy/pathplanner/navgrid.json +++ b/src/main/deploy/pathplanner/navgrid.json @@ -1 +1 @@ -{"field_size":{"x":16.54,"y":8.07},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file +{"field_size":{"x":17.548,"y":8.052},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/#1 Left to neutral to depot.path b/src/main/deploy/pathplanner/paths/#1 Left to neutral to depot.path deleted file mode 100644 index 41697e2..0000000 --- a/src/main/deploy/pathplanner/paths/#1 Left to neutral to depot.path +++ /dev/null @@ -1,240 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.566008403832779, - "y": 7.457340509007208 - }, - "prevControl": null, - "nextControl": { - "x": 4.521985876085326, - "y": 7.480627842977369 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 6.74844449371633, - "y": 7.323051878639669 - }, - "prevControl": { - "x": 6.2291917985744085, - "y": 7.524060964793236 - }, - "nextControl": { - "x": 7.0431955211446535, - "y": 7.208950141238001 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.47952715610716, - "y": 6.691750705058882 - }, - "prevControl": { - "x": 7.292883599447913, - "y": 7.06382367183081 - }, - "nextControl": { - "x": 7.8379030178105324, - "y": 5.97733027463995 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.087382414476883, - "y": 4.590804334971547 - }, - "prevControl": { - "x": 7.936968923942251, - "y": 4.34583816663551 - }, - "nextControl": { - "x": 6.538459561492894, - "y": 4.749078420670237 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.916583026285472, - "y": 5.201112001911139 - }, - "prevControl": { - "x": 6.21376543175226, - "y": 5.1960727035599605 - }, - "nextControl": { - "x": 5.263739822137, - "y": 5.212182212063977 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.6937744360902256, - "y": 5.201112001911139 - }, - "prevControl": { - "x": 3.9888322003988153, - "y": 5.214306565468976 - }, - "nextControl": { - "x": 3.124067643786618, - "y": 5.1756355244559655 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.990149028832779, - "y": 4.837340907023949 - }, - "prevControl": { - "x": 2.8573154908051226, - "y": 4.945749181223366 - }, - "nextControl": { - "x": 1.6302225889184676, - "y": 4.792344927704011 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 0.6028322871115273, - "y": 4.9415105872459275 - }, - "prevControl": { - "x": 0.7909637244103318, - "y": 4.776869880554399 - }, - "nextControl": { - "x": 0.4147008498127227, - "y": 5.106151293937456 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 0.422, - "y": 5.773 - }, - "prevControl": { - "x": 0.33797610762372643, - "y": 5.2179935180131 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0.5, - "rotationDegrees": 90.0 - }, - { - "waypointRelativePos": 1.2283611599297022, - "rotationDegrees": 39.34995956941872 - }, - { - "waypointRelativePos": 2.5766695957820738, - "rotationDegrees": 0.0 - }, - { - "waypointRelativePos": 3.847874720357959, - "rotationDegrees": -90.0 - }, - { - "waypointRelativePos": 5.3154362416107235, - "rotationDegrees": -90.0 - } - ], - "constraintZones": [ - { - "name": "Constraints Zone", - "minWaypointRelativePos": 1.908695652173902, - "maxWaypointRelativePos": 3.0565217391304893, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, - { - "name": "Constraints Zone", - "minWaypointRelativePos": 5.1521739130434785, - "maxWaypointRelativePos": 6.995652173913043, - "constraints": { - "maxVelocity": 2.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, - { - "name": "Constraints Zone", - "minWaypointRelativePos": 6.61304347826087, - "maxWaypointRelativePos": 8.0, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, - { - "name": "Constraints Zone", - "minWaypointRelativePos": 0, - "maxWaypointRelativePos": 1.0565217391304353, - "constraints": { - "maxVelocity": 5.0, - "maxAcceleration": 5.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - } - ], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0 - }, - "reversed": false, - "folder": "Left Autos", - "idealStartingState": { - "velocity": 0, - "rotation": 90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/#1 Right to neutral to outpost.path b/src/main/deploy/pathplanner/paths/#1 Right to neutral to outpost.path deleted file mode 100644 index abf72ff..0000000 --- a/src/main/deploy/pathplanner/paths/#1 Right to neutral to outpost.path +++ /dev/null @@ -1,177 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.5467141162514837, - "y": 0.6942704626334513 - }, - "prevControl": null, - "nextControl": { - "x": 5.83681954887218, - "y": 0.7017406015037613 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.8826690391459096, - "y": 2.1682799525557948 - }, - "prevControl": { - "x": 7.781962564626875, - "y": 0.7840023835584544 - }, - "nextControl": { - "x": 8.006240601503759, - "y": 3.866853383458647 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 6.580806642941877, - "y": 3.308754448403956 - }, - "prevControl": { - "x": 7.1708636727820885, - "y": 3.643041962063449 - }, - "nextControl": { - "x": 6.239052631578947, - "y": 3.115139097744361 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.896165413533835, - "y": 2.3898007518797 - }, - "prevControl": { - "x": 6.23245864661654, - "y": 2.3963947368421064 - }, - "nextControl": { - "x": 5.408403599071362, - "y": 2.3802367947333765 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.3970451127819548, - "y": 2.3898007518797 - }, - "prevControl": { - "x": 4.188323308270675, - "y": 2.3898007518797 - }, - "nextControl": { - "x": 2.61653997383818, - "y": 2.3898007518797 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.9727443609022557, - "y": 0.6942704626334513 - }, - "prevControl": { - "x": 2.625548872180451, - "y": 0.6951466165413536 - }, - "nextControl": { - "x": 1.2779706810951832, - "y": 0.6933379802989178 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 0.7001052631578946, - "y": 0.6942704626334513 - }, - "prevControl": { - "x": 1.41884962406015, - "y": 0.7017406015037613 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0.42628774422735277, - "rotationDegrees": 110.0 - }, - { - "waypointRelativePos": 1.2397868561279017, - "rotationDegrees": -174.49099985205402 - }, - { - "waypointRelativePos": 1.8117229129662467, - "rotationDegrees": -84.53943478963535 - }, - { - "waypointRelativePos": 3.01, - "rotationDegrees": -90.0 - }, - { - "waypointRelativePos": 3.9217002237136356, - "rotationDegrees": -90.0 - }, - { - "waypointRelativePos": 4.421476510067107, - "rotationDegrees": -46.41189920736874 - }, - { - "waypointRelativePos": 5, - "rotationDegrees": -90.0 - } - ], - "constraintZones": [ - { - "name": "Constraints Zone", - "minWaypointRelativePos": 0.6945652173913047, - "maxWaypointRelativePos": 1.6989130434782616, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - } - ], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": -90.0 - }, - "reversed": false, - "folder": "Right Autos", - "idealStartingState": { - "velocity": 0, - "rotation": 90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Depot to left climb.path b/src/main/deploy/pathplanner/paths/Depot to left climb.path deleted file mode 100644 index 58d333f..0000000 --- a/src/main/deploy/pathplanner/paths/Depot to left climb.path +++ /dev/null @@ -1,54 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 0.422, - "y": 5.773 - }, - "prevControl": null, - "nextControl": { - "x": 1.0075444839911454, - "y": 5.277686832734832 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.0720996441334938, - "y": 4.675172004739578 - }, - "prevControl": { - "x": 0.6955278766364597, - "y": 5.568185053375403 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": -90.9548412538722 - }, - "reversed": false, - "folder": "Miscellaneous", - "idealStartingState": { - "velocity": 0, - "rotation": -178.93180799138455 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Hub to depot.path b/src/main/deploy/pathplanner/paths/Hub to depot.path deleted file mode 100644 index e0e7a15..0000000 --- a/src/main/deploy/pathplanner/paths/Hub to depot.path +++ /dev/null @@ -1,107 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.3042052980132453, - "y": 4.034999999999999 - }, - "prevControl": null, - "nextControl": { - "x": 2.4910927152317885, - "y": 4.310877483443708 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.157135761589404, - "y": 4.499635761589404 - }, - "prevControl": { - "x": 3.0573675496688737, - "y": 4.064039735099337 - }, - "nextControl": { - "x": 1.4723524333341427, - "y": 4.8309825333258205 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.3658029801324503, - "y": 4.848112582781456 - }, - "prevControl": { - "x": 1.738682314703078, - "y": 4.7144388590674575 - }, - "nextControl": { - "x": 0.9810264900662253, - "y": 4.986051324503311 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 0.5889900662251655, - "y": 5.015091059602648 - }, - "prevControl": { - "x": 0.7414486754966887, - "y": 4.746473509933774 - }, - "nextControl": { - "x": 0.4330647443878781, - "y": 5.289816626649297 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 0.422, - "y": 5.773 - }, - "prevControl": { - "x": 0.4510513245033114, - "y": 5.276448675496688 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 1.0072639225181759, - "rotationDegrees": -153.03191204705334 - } - ], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0.0, - "rotation": 180.0 - }, - "reversed": false, - "folder": "Miscellaneous", - "idealStartingState": { - "velocity": 0, - "rotation": 90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Left bump to full neutral to left climb.path b/src/main/deploy/pathplanner/paths/Left bump to full neutral to left climb.path deleted file mode 100644 index c4d9ec2..0000000 --- a/src/main/deploy/pathplanner/paths/Left bump to full neutral to left climb.path +++ /dev/null @@ -1,167 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.5144365361856895, - "y": 2.3081494661867907 - }, - "prevControl": null, - "nextControl": { - "x": 5.375776986956745, - "y": 2.297390272829732 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 6.021328588380232, - "y": 2.006892052189162 - }, - "prevControl": { - "x": 5.537164887312617, - "y": 2.351186239615023 - }, - "nextControl": { - "x": 6.555545334563053, - "y": 1.627004588236932 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.280154211156034, - "y": 1.8347449584762319 - }, - "prevControl": { - "x": 7.153399179515186, - "y": 1.6192614046867888 - }, - "nextControl": { - "x": 7.6657356562137, - "y": 2.4902334150742735 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.732040332152474, - "y": 5.7295729537312745 - }, - "prevControl": { - "x": 7.925705812579521, - "y": 4.330877817313717 - }, - "nextControl": { - "x": 7.6961360653480275, - "y": 5.988881547318945 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 6.021328588380232, - "y": 5.7295729537312745 - }, - "prevControl": { - "x": 6.271328588380232, - "y": 5.7295729537312745 - }, - "nextControl": { - "x": 5.771328588380232, - "y": 5.7295729537312745 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.633392645319734, - "y": 5.7295729537312745 - }, - "prevControl": { - "x": 5.483368920527327, - "y": 5.75109134044539 - }, - "nextControl": { - "x": 3.794892006271031, - "y": 5.708345089451561 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.65370106762104, - "y": 5.471352313161878 - }, - "prevControl": { - "x": 3.1055871886174815, - "y": 5.643499406874809 - }, - "nextControl": { - "x": 2.246145015870587, - "y": 5.316092864875991 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.179691577704076, - "y": 4.71820877816781 - }, - "prevControl": { - "x": 1.6520157455763769, - "y": 4.719509578231146 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0.833037300177617, - "rotationDegrees": 90.0 - }, - { - "waypointRelativePos": 2.0, - "rotationDegrees": 143.9183590696913 - }, - { - "waypointRelativePos": 2.5737122557726524, - "rotationDegrees": 180.0 - }, - { - "waypointRelativePos": 3.7708703374777905, - "rotationDegrees": -90.0 - } - ], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": -90.0 - }, - "reversed": false, - "folder": "Left Autos", - "idealStartingState": { - "velocity": 0, - "rotation": 90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Outpost to right climb.path b/src/main/deploy/pathplanner/paths/Outpost to right climb.path deleted file mode 100644 index b98defd..0000000 --- a/src/main/deploy/pathplanner/paths/Outpost to right climb.path +++ /dev/null @@ -1,54 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 0.685, - "y": 0.694 - }, - "prevControl": null, - "nextControl": { - "x": 0.7925810786884072, - "y": 1.9743449216185502 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.0828588374851729, - "y": 2.803072360622224 - }, - "prevControl": { - "x": 0.7816014234875451, - "y": 1.264507710557533 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": -90.88140399658214 - }, - "reversed": false, - "folder": "Miscellaneous", - "idealStartingState": { - "velocity": 0, - "rotation": -90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Over the bump diagonal.path b/src/main/deploy/pathplanner/paths/Over the bump diagonal.path deleted file mode 100644 index 4d6aa13..0000000 --- a/src/main/deploy/pathplanner/paths/Over the bump diagonal.path +++ /dev/null @@ -1,154 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.5684887218045116, - "y": 4.038296992481204 - }, - "prevControl": null, - "nextControl": { - "x": 2.4211353383458647, - "y": 4.044890977443609 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.5684887218045116, - "y": 5.5746954887218045 - }, - "prevControl": { - "x": 2.5684887218045116, - "y": 5.5746954887218045 - }, - "nextControl": { - "x": 4.568488721804512, - "y": 5.5746954887218045 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.7049398496240595, - "y": 5.5746954887218045 - }, - "prevControl": { - "x": 5.005963194577661, - "y": 5.569841484172872 - }, - "nextControl": { - "x": 6.654473684210526, - "y": 5.58128947368421 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 6.984172932330827, - "y": 4.321838345864662 - }, - "prevControl": { - "x": 7.234744360902256, - "y": 4.908703007518798 - }, - "nextControl": { - "x": 6.802997893642992, - "y": 3.89750733420105 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.7049398496240595, - "y": 4.038296992481204 - }, - "prevControl": { - "x": 6.311586466165413, - "y": 4.025109022556391 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0.7534675615212593, - "rotationDegrees": 45.0 - }, - { - "waypointRelativePos": 2.0778523489932774, - "rotationDegrees": 45.0 - }, - { - "waypointRelativePos": 2.521700223713649, - "rotationDegrees": -51.12369435851797 - } - ], - "constraintZones": [ - { - "name": "Constraints Zone", - "minWaypointRelativePos": 0, - "maxWaypointRelativePos": 0.5239130434782816, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, - { - "name": "Constraints Zone", - "minWaypointRelativePos": 2.380434782608708, - "maxWaypointRelativePos": 4.0, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - } - ], - "pointTowardsZones": [], - "eventMarkers": [ - { - "name": "Start: shoot before bump", - "waypointRelativePos": 0.0, - "endWaypointRelativePos": 1.0798650168728918, - "command": { - "type": "named", - "data": { - "name": "Auto shoot" - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": -90.0 - }, - "reversed": false, - "folder": "Field Testing Autos", - "idealStartingState": { - "velocity": 0, - "rotation": 90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Over the bump.path b/src/main/deploy/pathplanner/paths/Over the bump.path deleted file mode 100644 index 1ded5e0..0000000 --- a/src/main/deploy/pathplanner/paths/Over the bump.path +++ /dev/null @@ -1,129 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.5684887218045116, - "y": 4.038296992481204 - }, - "prevControl": null, - "nextControl": { - "x": 2.4211353383458647, - "y": 4.044890977443609 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.5684887218045116, - "y": 5.5746954887218045 - }, - "prevControl": { - "x": 2.5684887218045116, - "y": 5.5746954887218045 - }, - "nextControl": { - "x": 4.568488721804512, - "y": 5.5746954887218045 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.7049398496240595, - "y": 5.5746954887218045 - }, - "prevControl": { - "x": 5.005963194577661, - "y": 5.569841484172872 - }, - "nextControl": { - "x": 6.654473684210526, - "y": 5.58128947368421 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 6.984172932330827, - "y": 4.321838345864662 - }, - "prevControl": { - "x": 7.234744360902256, - "y": 4.908703007518798 - }, - "nextControl": { - "x": 6.802997893642992, - "y": 3.89750733420105 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.7049398496240595, - "y": 4.038296992481204 - }, - "prevControl": { - "x": 6.311586466165413, - "y": 4.025109022556391 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [ - { - "name": "Constraints Zone", - "minWaypointRelativePos": 0, - "maxWaypointRelativePos": 0.5239130434782816, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, - { - "name": "Constraints Zone", - "minWaypointRelativePos": 2.380434782608708, - "maxWaypointRelativePos": 4.0, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - } - } - ], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": 90.0 - }, - "reversed": false, - "folder": "Field Testing Autos", - "idealStartingState": { - "velocity": 0, - "rotation": 90.0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Testing aim while going back and forth.path b/src/main/deploy/pathplanner/paths/Testing aim while going back and forth.path deleted file mode 100644 index 0852a17..0000000 --- a/src/main/deploy/pathplanner/paths/Testing aim while going back and forth.path +++ /dev/null @@ -1,125 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 3.857070063694267, - "y": 4.0403795966785285 - }, - "prevControl": null, - "nextControl": { - "x": 3.1833495920265396, - "y": 4.013220198675495 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.265063694267516, - "y": 4.0403795966785285 - }, - "prevControl": { - "x": 3.3729511677282376, - "y": 4.044309978768578 - }, - "nextControl": { - "x": 2.0150652674682976, - "y": 4.039492693123095 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0043842887473464, - "y": 4.789108280254777 - }, - "prevControl": { - "x": 1.9764543524416136, - "y": 4.267749469214438 - }, - "nextControl": { - "x": 2.0323142250530792, - "y": 5.310467091295116 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0043842887473464, - "y": 6.9117834394904465 - }, - "prevControl": { - "x": 2.0881740976645435, - "y": 6.362494692144375 - }, - "nextControl": { - "x": 1.9108676353262055, - "y": 7.524837056362372 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0043842887473464, - "y": 2.1357643312101926 - }, - "prevControl": { - "x": 1.9159394904458606, - "y": 4.8915180467091375 - }, - "nextControl": { - "x": 2.092829087048832, - "y": -0.6199893842887501 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.9260721868365174, - "y": 4.0403795966785285 - }, - "prevControl": { - "x": 2.1254140127388528, - "y": 1.2513163481953304 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [ - { - "name": "Auto shoot", - "waypointRelativePos": 0.5101010101009686, - "endWaypointRelativePos": 5.0, - "command": null - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": 90.0 - }, - "reversed": false, - "folder": null, - "idealStartingState": { - "velocity": 0, - "rotation": 91.08092418666074 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/settings.json b/src/main/deploy/pathplanner/settings.json index 101c039..c606f42 100644 --- a/src/main/deploy/pathplanner/settings.json +++ b/src/main/deploy/pathplanner/settings.json @@ -3,11 +3,12 @@ "robotLength": 0.832, "holonomicMode": true, "pathFolders": [ - "Center Autos", - "Left Autos", - "Miscellaneous", - "Field Testing Autos", - "Right Autos" + "Ground BSide", + "Ground LSide", + "Station RSide", + "Lollipop Path", + "Station Left", + "Sweep Right Side" ], "autoFolders": [], "defaultMaxVel": 3.0, diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 6f854c0..3513a21 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -7,7 +7,6 @@ import org.json.simple.parser.ParseException; import org.littletonrobotics.junction.Logger; import com.pathplanner.lib.auto.AutoBuilder; -import com.pathplanner.lib.auto.NamedCommands; import com.pathplanner.lib.commands.PathPlannerAuto; import edu.wpi.first.math.geometry.Pose3d; @@ -117,9 +116,8 @@ public class RobotContainer { PathGroupLoader.loadPathGroups(); // Load the auto command try { - String testingAuto = "Testing Over the Bump"; - PathPlannerAuto.getPathGroupFromAutoFile(testingAuto); - auto = new PathPlannerAuto(testingAuto); + PathPlannerAuto.getPathGroupFromAutoFile("Command Name"); + auto = new PathPlannerAuto("Path Name"); } catch (IOException | ParseException e) { e.printStackTrace(); } @@ -165,6 +163,10 @@ public class RobotContainer { } public void registerCommands() { +<<<<<<< HEAD +======= + +>>>>>>> parent of ae21e1f7 (Merge branch 'arnavs-mega-velocityvoltage-turret' into beta-bot) } public static BooleanSupplier getAllianceColorBooleanSupplier() { diff --git a/src/main/java/frc/robot/commands/gpm/SimpleAutoShoot.java b/src/main/java/frc/robot/commands/gpm/SimpleAutoShoot.java index b8f07ff..60dcbfe 100644 --- a/src/main/java/frc/robot/commands/gpm/SimpleAutoShoot.java +++ b/src/main/java/frc/robot/commands/gpm/SimpleAutoShoot.java @@ -12,7 +12,6 @@ import edu.wpi.first.math.kinematics.ChassisSpeeds; import edu.wpi.first.math.util.Units; import edu.wpi.first.units.Unit; import edu.wpi.first.wpilibj.DriverStation.Alliance; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.Robot; import frc.robot.constants.Constants; @@ -110,7 +109,6 @@ public class SimpleAutoShoot extends Command { @Override public void execute() { - SmartDashboard.putNumber("Robot X Position", drivepose.getX()); //shooter.setShooterPower(ShotInterpolation.shooterPowerMap.get(FieldConstants.getHubTranslation().toTranslation2d().getDistance(drivetrain.getPose().getTranslation()))); // Continuously update setpoints and adjust based on vision if available drivepose = drivetrain.getPose().getTranslation(); @@ -129,7 +127,7 @@ public class SimpleAutoShoot extends Command { Logger.recordOutput("Spinny accel", drivetrain.getAngularRate(2)); Logger.recordOutput("Original Turret Setpoint", turretSetpoint); - turret.setFieldRelativeTarget(new Rotation2d(Units.degreesToRadians(turretSetpoint)), -drivetrain.getAngularRate(2)); + turret.setFieldRelativeTarget(new Rotation2d(Units.degreesToRadians(turretSetpoint)), -drivetrain.getAngularRate(2) - velocityAdjustment); // turret.setFieldRelativeTarget(new Rotation2d(Units.degreesToRadians(turretSetpoint)), (-drivetrain.getAngularRate(2)) + turretAcceleration * 0.3); //turret.setFieldRelativeTarget(new Rotation2d(Units.degreesToRadians(turretSetpoint)), turretVelocity); diff --git a/src/main/java/frc/robot/subsystems/shooter/Shooter.java b/src/main/java/frc/robot/subsystems/shooter/Shooter.java index acad7ef..504a06f 100644 --- a/src/main/java/frc/robot/subsystems/shooter/Shooter.java +++ b/src/main/java/frc/robot/subsystems/shooter/Shooter.java @@ -5,8 +5,6 @@ import org.littletonrobotics.junction.Logger; import com.ctre.phoenix6.configs.MotorOutputConfigs; import com.ctre.phoenix6.configs.TalonFXConfiguration; -import com.ctre.phoenix6.controls.VelocityDutyCycle; -import com.ctre.phoenix6.controls.TorqueCurrentFOC; import com.ctre.phoenix6.controls.VelocityVoltage; import com.ctre.phoenix6.hardware.TalonFX; import com.ctre.phoenix6.signals.InvertedValue; @@ -18,8 +16,11 @@ import au.grapplerobotics.interfaces.LaserCanInterface.Measurement; import au.grapplerobotics.interfaces.LaserCanInterface.RangingMode; import au.grapplerobotics.interfaces.LaserCanInterface.RegionOfInterest; import au.grapplerobotics.interfaces.LaserCanInterface.TimingBudget; +<<<<<<< HEAD import edu.wpi.first.math.filter.Debouncer; import edu.wpi.first.math.filter.Debouncer.DebounceType; +======= +>>>>>>> parent of ae21e1f7 (Merge branch 'arnavs-mega-velocityvoltage-turret' into beta-bot) import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; @@ -35,6 +36,7 @@ public class Shooter extends SubsystemBase implements ShooterIO { // Goal Velocity / Double theCircumfrence private double shooterTargetSpeed = 0; + private double feederPower = 0; public boolean shooterAtMaxSpeed = false; @@ -46,29 +48,6 @@ public class Shooter extends SubsystemBase implements ShooterIO { double powerModifier; - // for tracking current phase: used to adjust the setting - private FlywheelPhase phase; - - private double torqueCurrentDebounceTime = 0.5; - - VelocityDutyCycle velocityDutyCycle = new VelocityDutyCycle(0); - TorqueCurrentFOC torqueCurrentFOC = new TorqueCurrentFOC(0); - - /* - * Debouncers take in certain statement. If it is false: it checks for how long (the first parameter) - * If it is long enough then return True. - */ - private Debouncer torqueCurrentDebouncer = new Debouncer(torqueCurrentDebounceTime, DebounceType.kFalling); - - @AutoLogOutput private long launchCount = 0; - private boolean lastTorqueCurrentControl = false; - - public enum FlywheelPhase { - BANG_BANG, - CONSTANT_TORQUE, - START_UP - } - public Shooter(){ updateInputs(); @@ -81,12 +60,12 @@ public class Shooter extends SubsystemBase implements ShooterIO { shooterMotorLeft.getConfigurator().apply(config); shooterMotorRight.getConfigurator().apply(config); - shooterMotorRight.getConfigurator().apply( + shooterMotorLeft.getConfigurator().apply( new MotorOutputConfigs().withInverted(InvertedValue.Clockwise_Positive) .withNeutralMode(NeutralModeValue.Coast) ); - shooterMotorLeft.getConfigurator().apply( + shooterMotorRight.getConfigurator().apply( new MotorOutputConfigs().withNeutralMode(NeutralModeValue.Coast) ); diff --git a/src/main/java/frc/robot/subsystems/shooter/ShooterIO.java b/src/main/java/frc/robot/subsystems/shooter/ShooterIO.java index 2ba5732..872b136 100644 --- a/src/main/java/frc/robot/subsystems/shooter/ShooterIO.java +++ b/src/main/java/frc/robot/subsystems/shooter/ShooterIO.java @@ -10,4 +10,4 @@ public interface ShooterIO { } public void updateInputs(); -} \ No newline at end of file +} diff --git a/src/main/java/frc/robot/subsystems/turret/Turret.java b/src/main/java/frc/robot/subsystems/turret/Turret.java index dcacc86..f856892 100644 --- a/src/main/java/frc/robot/subsystems/turret/Turret.java +++ b/src/main/java/frc/robot/subsystems/turret/Turret.java @@ -5,10 +5,13 @@ import org.littletonrobotics.junction.Logger; import com.ctre.phoenix6.configs.MotorOutputConfigs; import com.ctre.phoenix6.configs.Slot0Configs; import com.ctre.phoenix6.configs.TalonFXConfiguration; +import com.ctre.phoenix6.controls.MotionMagicDutyCycle; +import com.ctre.phoenix6.controls.MotionMagicVelocityVoltage; import com.ctre.phoenix6.controls.MotionMagicVoltage; import com.ctre.phoenix6.controls.VelocityVoltage; import com.ctre.phoenix6.hardware.CANcoder; import com.ctre.phoenix6.hardware.TalonFX; +import com.ctre.phoenix6.signals.FeedbackSensorSourceValue; import com.ctre.phoenix6.signals.InvertedValue; import com.ctre.phoenix6.signals.NeutralModeValue; import com.ctre.phoenix6.sim.TalonFXSimState; @@ -16,7 +19,6 @@ import com.ctre.phoenix6.sim.TalonFXSimState; import edu.wpi.first.math.MathUtil; import edu.wpi.first.math.controller.PIDController; import edu.wpi.first.math.controller.SimpleMotorFeedforward; -import edu.wpi.first.math.filter.LinearFilter; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.system.plant.DCMotor; import edu.wpi.first.math.trajectory.TrapezoidProfile; @@ -51,7 +53,9 @@ public class Turret extends SubsystemBase implements TurretIO{ private static final double MIN_ANGLE_RAD = Units.degreesToRadians(-180); // Change this later to the actual values private static final double MAX_ANGLE_RAD = Units.degreesToRadians(180); - private static final double MAX_VEL_RAD_PER_SEC = 600; + private static final double MAX_VEL_RAD_PER_SEC = 15; + //private static final double MAX_VEL_RAD_PER_SEC = 3.0; // Starting super duper slow for now + // private static final double MAX_ACCEL_RAD_PER_SEC2 = 160.0; private static final double MAX_ACCEL_RAD_PER_SEC2 = 160.0; private static final double GEAR_RATIO = TurretConstants.TURRET_GEAR_RATIO; @@ -62,9 +66,6 @@ public class Turret extends SubsystemBase implements TurretIO{ private final CANcoder encoderLeft = new CANcoder(0, Constants.SUBSYSTEM_CANIVORE_CAN); private final CANcoder encoderRight = new CANcoder(1, Constants.SUBSYSTEM_CANIVORE_CAN); - private final LinearFilter setpointFilter = LinearFilter.singlePoleIIR(0.02 - , 0.02); - private final TurretIOInputsAutoLogged inputs = new TurretIOInputsAutoLogged(); @@ -89,8 +90,6 @@ public class Turret extends SubsystemBase implements TurretIO{ private Rotation2d goalAngle = Rotation2d.kZero; private double goalVelocityRadPerSec = 0.0; private double lastGoalRad = 0.0; - private double lastFilteredRad = 0.0; - private double lastRawSetpoint = 0.0; // private final MotionMagicVelocityVoltage velocityRequest = new MotionMagicVelocityVoltage(0.0).withUpdateFreqHz(0); @@ -100,8 +99,6 @@ public class Turret extends SubsystemBase implements TurretIO{ private static final double kD = 0.2; - private double acclerationAdjustment = 0.0; - /* ---------------- Visualization ---------------- */ private final Mechanism2d mech = new Mechanism2d(100, 100); @@ -109,35 +106,25 @@ public class Turret extends SubsystemBase implements TurretIO{ private final MechanismLigament2d ligament = root.append(new MechanismLigament2d("barrel", 30, 0)); // private final SimpleMotorFeedforward feedForward = new SimpleMotorFeedforward(.1, 1. / DCMotor.getKrakenX60(1).KvRadPerSecPerVolt, 0.010); - private final SimpleMotorFeedforward feedForward = new SimpleMotorFeedforward(0.1, 1. / DCMotor.getKrakenX60(1).KvRadPerSecPerVolt * 2.0, 0); + private final SimpleMotorFeedforward feedForward = new SimpleMotorFeedforward(0.1, (1. / DCMotor.getKrakenX60(1).KvRadPerSecPerVolt) * 0.8, 0); private final MotionMagicVoltage mmVoltageRequest = new MotionMagicVoltage(0); /* ---------------- Constructor ---------------- */ public Turret() { - motor.setNeutralMode(NeutralModeValue.Brake); + motor.setNeutralMode(NeutralModeValue.Coast); + + // motor.getConfigurator().apply( + // new Slot0Configs() + // .withKP(kP) + // .withKD(kD)); TalonFXConfiguration config = new TalonFXConfiguration(); - config.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; - - config.Slot0.kP = 12.0; - config.Slot0.kS = 0.1; // Static friction compensation - config.Slot0.kV = 0.12; // Adjusted kV for the gear ratio - config.Slot0.kD = 0.15; // The "Braking" term to stop overshoot - - var mm = config.MotionMagic; - mm.MotionMagicCruiseVelocity = Units.radiansToRotations(MAX_VEL_RAD_PER_SEC) * GEAR_RATIO; - mm.MotionMagicAcceleration = Units.radiansToRotations(120.0) * GEAR_RATIO; // Lowered for belt safety - mm.MotionMagicJerk = 0; //Units.radiansToRotations(400.0) * GEAR_RATIO * 1000000000 * 10000000 * 100000000 * 10000000; // Set to > 0 for "S-Curve" smoothing if needed -- maybe 10-20x the acceleration + var motionMagicConfigs = config.MotionMagic; + motionMagicConfigs.MotionMagicCruiseVelocity = 10 * GEAR_RATIO; + motionMagicConfigs.MotionMagicAcceleration = 50 * GEAR_RATIO; motor.getConfigurator().apply(config); - - motor.setPosition(0.0); - - // Dashboard setup for tuning - SmartDashboard.putNumber("Turret/kP", config.Slot0.kP); - SmartDashboard.putNumber("Turret/kS", config.Slot0.kS); - SmartDashboard.putNumber("Turret/kV", config.Slot0.kV); - SmartDashboard.putNumber("Turret/kD", config.Slot0.kD); + motor.getConfigurator().apply(new MotorOutputConfigs().withInverted(InvertedValue.Clockwise_Positive)); // profile = new TrapezoidProfile(new Constraints(MAX_VEL_RAD_PER_SEC, feedForward.maxAchievableAcceleration(DCMotor.getKrakenX60(1, GEAR_RATIO), goalVelocityRadPerSec)))) @@ -203,24 +190,15 @@ public class Turret extends SubsystemBase implements TurretIO{ @Override public void periodic() { - updateInputs(); - Logger.processInputs("Turret", inputs); - - acclerationAdjustment = SmartDashboard.getNumber("Acc Adjust", acclerationAdjustment); - SmartDashboard.putNumber("Acc Adjust", acclerationAdjustment); double robotRelativeGoal = goalAngle.getRadians(); // --- MA-style continuous wrap selection --- - - double lookAheadSeconds = 0.060; - double futureRobotAngle = goalAngle.getRadians() + (goalVelocityRadPerSec * lookAheadSeconds); - double best = lastGoalRad; boolean found = false; for (int i = -2; i <= 2; i++) { - double candidate = futureRobotAngle + 2.0 * Math.PI * i; + double candidate = robotRelativeGoal + 2.0 * Math.PI * i; if (candidate < MIN_ANGLE_RAD || candidate > MAX_ANGLE_RAD) continue; @@ -232,49 +210,43 @@ public class Turret extends SubsystemBase implements TurretIO{ lastGoalRad = best; - // calculate shortest angular delta - double delta = best - lastRawSetpoint; - delta = MathUtil.angleModulus(delta); - - // filter delta - double filteredDelta = setpointFilter.calculate(delta); - - // apply filtered range - lastFilteredRad = MathUtil.angleModulus(lastFilteredRad + filteredDelta); - lastRawSetpoint = best; - best = lastFilteredRad; - - // Tells the Kraken to get to this position using 1000Hz profile - double motorGoalRotations = Units.radiansToRotations(best) * GEAR_RATIO; - // if (isInDeadband) { - // if (absError > START_THRESHOLD_RAD) { - // isInDeadband = false; - // lastGoalRad = best; - // } - // } else { - // lastGoalRad = best; - // if (absError < STOP_THRESHOLD_RAD) { - // isInDeadband = true; - // } - // } - - motorGoalRotations = MathUtil.clamp(motorGoalRotations, Units.degreesToRotations(-180) * GEAR_RATIO, Units.degreesToRotations(180) * GEAR_RATIO); - - double acceleration = (goalVelocityRadPerSec - lastFrameVelocity)/Constants.LOOP_TIME; - // Add the feedforward for the target velocity (SOTM) here as well - double feedforwardVoltage = feedForward.calculate((goalVelocityRadPerSec) * GEAR_RATIO); - - double robotTurnCompensation = goalVelocityRadPerSec * 0.185; + // --- Profile in MECHANISM SPACE --- + State goalState = new State( + MathUtil.clamp(best, MIN_ANGLE_RAD, MAX_ANGLE_RAD), + goalVelocityRadPerSec); + + setpoint = profile.calculate( + Constants.LOOP_TIME, + setpoint, + goalState); + + // --- Convert to MOTOR SPACE --- + double motorPosRot = Units.radiansToRotations(setpoint.position) * GEAR_RATIO; + + double motorVelRotPerSec = Units.radiansToRotations(setpoint.velocity) * GEAR_RATIO; + + double targetVelocity; + + double motorSetpointPosition = (setpoint.position) * GEAR_RATIO; - motor.setControl(mmVoltageRequest - .withPosition(motorGoalRotations) - .withFeedForward(robotTurnCompensation)); + targetVelocity = + positionPID.calculate( + motor.getPosition().getValue().in(edu.wpi.first.units.Units.Radians), + motorSetpointPosition); + + targetVelocity += Units.rotationsToRadians(motorVelRotPerSec) * 1.0; - Logger.recordOutput("Turret/FilteredSetpoint", Units.radiansToDegrees(best)); + double voltage = feedForward.calculate(targetVelocity); + + // double velocityCorrectionVoltage = velocityPID.calculate(Units.rotationsToRadians(motor.getVelocity().getValueAsDouble()), targetVelocity); + // voltage += velocityCorrectionVoltage; + + motor.setVoltage(voltage); lastFrameVelocity = Units.rotationsToRadians(motor.getVelocity().getValueAsDouble()); Logger.recordOutput("Turret/Voltage", motor.getMotorVoltage().getValue()); + Logger.recordOutput("Turret/velocitySetpoint", targetVelocity / GEAR_RATIO); Logger.recordOutput("Turret/setpointDeg", Units.radiansToDegrees(setpoint.position)); // --- Visualization --- @@ -285,15 +257,6 @@ public class Turret extends SubsystemBase implements TurretIO{ // SmartDashboard.putNumber("Encoder Left", encoderLeft.get()); // SmartDashboard.putNumber("Encoder Right", encoderRight.get()); - Logger.recordOutput("Turret/setpointDeg", Units.radiansToDegrees(motorGoalRotations) / GEAR_RATIO); - //Logger.recordOutput("Turret/velocitySetpoint", targetVelocity / GEAR_RATIO); - - // --- Position + velocity feedforward (MA-style) --- - // motor.setControl(request); - // motor.clearStickyFaults(); - - // --- Visualization --- - ligament.setAngle(Units.radiansToDegrees(getPositionRad())); } /* ---------------- Simulation ---------------- */ diff --git a/src/main/java/frc/robot/subsystems/turret/TurretConstants.java b/src/main/java/frc/robot/subsystems/turret/TurretConstants.java index b5a1ac0..10fee61 100644 --- a/src/main/java/frc/robot/subsystems/turret/TurretConstants.java +++ b/src/main/java/frc/robot/subsystems/turret/TurretConstants.java @@ -1,11 +1,7 @@ package frc.robot.subsystems.turret; -import edu.wpi.first.math.geometry.Rotation3d; -import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.math.geometry.Translation3d; import edu.wpi.first.math.util.Units; -import frc.robot.constants.Constants; -import frc.robot.constants.swerve.DriveConstants; public class TurretConstants { public static double MAX_ANGLE = 200; @@ -29,4 +25,4 @@ public class TurretConstants { public static Translation3d DISTANCE_FROM_ROBOT_CENTER = new Translation3d(0,0, Units.inchesToMeters(22.172)); //meters public static double CRT_TOLERANCE = 0.01; -} +} \ No newline at end of file