From: moo Date: Fri, 24 Apr 2026 01:11:13 +0000 (-0700) Subject: adding paths X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=4b39af97fb4a5c099c2dad2ac61acaf3d837b6e0;p=FRC2026.git adding paths Co-Authored-By: WesleyWong-972 <171457173+Wesley28w@users.noreply.github.com> Co-Authored-By: Timofei <108955303+iefomit@users.noreply.github.com> --- diff --git a/src/main/deploy/pathplanner/autos/DepotCenterPath.auto b/src/main/deploy/pathplanner/autos/DepotCenterPath.auto new file mode 100644 index 0000000..3604f48 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/DepotCenterPath.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Depot Center Path" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/LeftBumpDepotCenter.auto b/src/main/deploy/pathplanner/autos/LeftBumpDepotCenter.auto new file mode 100644 index 0000000..1851c11 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/LeftBumpDepotCenter.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Left Bump Depot Center Path" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/LeftTrenchDepotCenter.auto b/src/main/deploy/pathplanner/autos/LeftTrenchDepotCenter.auto new file mode 100644 index 0000000..26a5225 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/LeftTrenchDepotCenter.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Left Trench Depot Center Path" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Depot Center Path.path b/src/main/deploy/pathplanner/paths/Depot Center Path.path index eca828c..d3b0363 100644 --- a/src/main/deploy/pathplanner/paths/Depot Center Path.path +++ b/src/main/deploy/pathplanner/paths/Depot Center Path.path @@ -36,7 +36,7 @@ "y": 6.988398576512456 }, "prevControl": { - "x": 0.4401261451464529, + "x": 0.44012614514645276, "y": 6.826913016145912 }, "nextControl": { @@ -74,7 +74,21 @@ "rotationDegrees": 0.0 } ], - "constraintZones": [], + "constraintZones": [ + { + "name": "Constraints Zone", + "minWaypointRelativePos": 0.5061867266591578, + "maxWaypointRelativePos": 2.3284589426321785, + "constraints": { + "maxVelocity": 1.0, + "maxAcceleration": 1.0, + "maxAngularVelocity": 200.0, + "maxAngularAcceleration": 300.0, + "nominalVoltage": 12.0, + "unlimited": false + } + } + ], "pointTowardsZones": [], "eventMarkers": [ { @@ -136,7 +150,7 @@ "folder": null, "idealStartingState": { "velocity": 0, - "rotation": 0.0 + "rotation": 180.0 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Left Bump Depot Center Path.path b/src/main/deploy/pathplanner/paths/Left Bump Depot Center Path.path index 70879bf..9b9f2d4 100644 --- a/src/main/deploy/pathplanner/paths/Left Bump Depot Center Path.path +++ b/src/main/deploy/pathplanner/paths/Left Bump Depot Center Path.path @@ -36,7 +36,7 @@ "y": 4.944151838666582 }, "prevControl": { - "x": 0.32971530249110376, + "x": 0.3297153024911038, "y": 4.83655990510083 }, "nextControl": { @@ -52,24 +52,24 @@ "y": 6.041589561086512 }, "prevControl": { - "x": 2.509641474721047, - "y": 5.48937238568611 + "x": 2.6660894988160155, + "y": 5.549623259497286 }, "nextControl": { - "x": 3.041032028469752, - "y": 6.827010676156583 + "x": 2.847366548042706, + "y": 6.9668801897983395 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 4.5, - "y": 7.623 + "x": 4.579596678529064, + "y": 7.590913404507711 }, "prevControl": { - "x": 3.428383113987069, - "y": 7.720021902743396 + "x": 3.545234957349378, + "y": 7.474544158360471 }, "nextControl": null, "isLocked": false, @@ -87,26 +87,13 @@ } ], "constraintZones": [ - { - "name": "After Depot", - "minWaypointRelativePos": 1.5082690187431023, - "maxWaypointRelativePos": 2.2403528114663795, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 1.5, - "maxAngularVelocity": 200.0, - "maxAngularAcceleration": 300.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, { "name": "Constraints Zone", - "minWaypointRelativePos": 3.5, - "maxWaypointRelativePos": 3.995589856670343, + "minWaypointRelativePos": 0.0, + "maxWaypointRelativePos": 4.5, "constraints": { "maxVelocity": 1.0, - "maxAcceleration": 1.5, + "maxAcceleration": 1.0, "maxAngularVelocity": 200.0, "maxAngularAcceleration": 300.0, "nominalVoltage": 12.0, @@ -116,45 +103,53 @@ ], "pointTowardsZones": [], "eventMarkers": [ - { - "name": "Hood Down", - "waypointRelativePos": 0, - "endWaypointRelativePos": null, - "command": null - }, - { - "name": "Stop Spindexer", - "waypointRelativePos": 0.0, - "endWaypointRelativePos": null, - "command": null - }, { "name": "Spin Intake Rollers", - "waypointRelativePos": 0.899669239250276, + "waypointRelativePos": 0, "endWaypointRelativePos": null, - "command": null + "command": { + "type": "named", + "data": { + "name": "Spin Intake Rollers" + } + } }, { "name": "Extend Intake", - "waypointRelativePos": 0.9, + "waypointRelativePos": 0, "endWaypointRelativePos": null, - "command": null + "command": { + "type": "named", + "data": { + "name": "Extend Intake" + } + } }, { - "name": "Start Spindexer", - "waypointRelativePos": 4.0, + "name": "Stop Hood Down", + "waypointRelativePos": 0, "endWaypointRelativePos": null, - "command": null + "command": { + "type": "named", + "data": { + "name": "Stop Hood Down" + } + } }, { - "name": "Stop Hood Down", - "waypointRelativePos": 4.0, + "name": "Stop Spindexer", + "waypointRelativePos": 0, "endWaypointRelativePos": null, - "command": null + "command": { + "type": "named", + "data": { + "name": "Stop Spindexer" + } + } }, { - "name": "Start Intake Seizure", - "waypointRelativePos": 4.0, + "name": "Start Spindexer", + "waypointRelativePos": 0, "endWaypointRelativePos": null, "command": null } @@ -175,7 +170,7 @@ "folder": null, "idealStartingState": { "velocity": 0, - "rotation": 0.0 + "rotation": 180.0 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Left Trench Depot Center Path.path b/src/main/deploy/pathplanner/paths/Left Trench Depot Center Path.path index 2c027a0..8a911fe 100644 --- a/src/main/deploy/pathplanner/paths/Left Trench Depot Center Path.path +++ b/src/main/deploy/pathplanner/paths/Left Trench Depot Center Path.path @@ -9,7 +9,7 @@ "prevControl": null, "nextControl": { "x": 2.492313167259787, - "y": 6.891565836298932 + "y": 6.568790035587188 }, "isLocked": false, "linkedName": null @@ -32,32 +32,32 @@ }, { "anchor": { - "x": 0.7062870699861263, - "y": 4.944151838666582 + "x": 0.8461565836298937, + "y": 4.997947805456701 }, "prevControl": { - "x": 0.23241295545659613, - "y": 4.787437564570203 + "x": 0.3722824691003634, + "y": 4.841233531360322 }, "nextControl": { - "x": 2.0727046263325084, - "y": 5.396037959663023 + "x": 2.212574139976275, + "y": 5.449833926453142 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 2.7290154211130537, - "y": 6.041589561086512 + "x": 2.5138315539739033, + "y": 6.030830367734283 }, "prevControl": { - "x": 2.4159215599025865, - "y": 5.447156064644024 + "x": 2.3524436536180313, + "y": 5.471352313167261 }, "nextControl": { - "x": 3.042109282323521, - "y": 6.636023057528999 + "x": 2.7881778575014478, + "y": 6.981897553296436 }, "isLocked": false, "linkedName": null @@ -68,8 +68,8 @@ "y": 7.623 }, "prevControl": { - "x": 3.428383113987069, - "y": 7.720021902743396 + "x": 3.5036773428232504, + "y": 7.354211150652431 }, "nextControl": null, "isLocked": false, @@ -87,26 +87,13 @@ } ], "constraintZones": [ - { - "name": "After Depot", - "minWaypointRelativePos": 1.5082690187431023, - "maxWaypointRelativePos": 2.2403528114663795, - "constraints": { - "maxVelocity": 1.0, - "maxAcceleration": 1.5, - "maxAngularVelocity": 200.0, - "maxAngularAcceleration": 300.0, - "nominalVoltage": 12.0, - "unlimited": false - } - }, { "name": "Constraints Zone", - "minWaypointRelativePos": 3.5, - "maxWaypointRelativePos": 3.995589856670343, + "minWaypointRelativePos": 0.4769403824521941, + "maxWaypointRelativePos": 3.1136107986502153, "constraints": { "maxVelocity": 1.0, - "maxAcceleration": 1.5, + "maxAcceleration": 1.0, "maxAngularVelocity": 200.0, "maxAngularAcceleration": 300.0, "nominalVoltage": 12.0, @@ -175,7 +162,7 @@ "folder": null, "idealStartingState": { "velocity": 0, - "rotation": 0.0 + "rotation": 180.0 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 7413aeb..94b0c42 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -284,6 +284,11 @@ public class RobotContainer { String leftDoNothing = "Left Do Nothing"; String rightDoNothing = "Right Do Nothing"; String centerDoNothing = "Center Do Nothing"; + String leftShallowDoubleSwipe = "LeftShallowDoubleSwipe"; + String rightShallowDoubleSwipe = "RightShallowDoubleSwipe"; + String leftBumpDepotCenter = "LeftBumpDepotCenter"; + String leftTrenchDepotCenter = "LeftTrenchDepotCenter"; + String depotCenterPath = "DepotCenterPath"; autoChooser.setDefaultOption("Default", getDefaultAuto()); addAuto(leftSideAuto); @@ -296,8 +301,11 @@ public class RobotContainer { addAuto(leftDoNothing); addAuto(rightDoNothing); addAuto(centerDoNothing); - addAuto("LeftShallowDoubleSwipe"); - addAuto("RightShallowDoubleSwipe"); + addAuto(leftShallowDoubleSwipe); + addAuto(rightShallowDoubleSwipe); + addAuto(leftBumpDepotCenter); + addAuto(leftTrenchDepotCenter); + addAuto(depotCenterPath); DynamicAutoBuilder dynamicAutoBuilder = new DynamicAutoBuilder(spindexer, turret, hood, intake);