From 2b9a63f8c687224c5a97cc3a1354868ddfec3c19 Mon Sep 17 00:00:00 2001 From: Wesley28w Date: Fri, 10 Apr 2026 08:30:06 -0700 Subject: [PATCH] added do nothing paths, corrected default to be just shoot... --- .../pathplanner/autos/Center Do Nothing.auto | 49 +++++++++++++++++ .../pathplanner/autos/Left Do Nothing.auto | 49 +++++++++++++++++ .../pathplanner/autos/LeftSwipeOne.auto | 19 +++++++ .../pathplanner/autos/LeftSwipeTwo.auto | 19 +++++++ .../deploy/pathplanner/autos/New Auto.auto | 25 +++++++++ .../pathplanner/autos/Right Do Nothing.auto | 49 +++++++++++++++++ .../pathplanner/autos/RightSwipeOne.auto | 19 +++++++ .../pathplanner/autos/RightSwipeTwo.auto | 19 +++++++ .../paths/Center Drop Back Path.path | 54 +++++++++++++++++++ .../pathplanner/paths/ConservativeSwipe1.path | 4 +- .../paths/Left Drop Back Path.path | 54 +++++++++++++++++++ .../paths/Right Drop Back Path.path | 54 +++++++++++++++++++ .../pathplanner/paths/Right Swipe1.path | 6 +-- src/main/java/frc/robot/RobotContainer.java | 18 +++++-- 14 files changed, 430 insertions(+), 8 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/Center Do Nothing.auto create mode 100644 src/main/deploy/pathplanner/autos/Left Do Nothing.auto create mode 100644 src/main/deploy/pathplanner/autos/LeftSwipeOne.auto create mode 100644 src/main/deploy/pathplanner/autos/LeftSwipeTwo.auto create mode 100644 src/main/deploy/pathplanner/autos/New Auto.auto create mode 100644 src/main/deploy/pathplanner/autos/Right Do Nothing.auto create mode 100644 src/main/deploy/pathplanner/autos/RightSwipeOne.auto create mode 100644 src/main/deploy/pathplanner/autos/RightSwipeTwo.auto create mode 100644 src/main/deploy/pathplanner/paths/Center Drop Back Path.path create mode 100644 src/main/deploy/pathplanner/paths/Left Drop Back Path.path create mode 100644 src/main/deploy/pathplanner/paths/Right Drop Back Path.path diff --git a/src/main/deploy/pathplanner/autos/Center Do Nothing.auto b/src/main/deploy/pathplanner/autos/Center Do Nothing.auto new file mode 100644 index 0000000..58b2d1b --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Center Do Nothing.auto @@ -0,0 +1,49 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Hood Down" + } + }, + { + "type": "named", + "data": { + "name": "Stop Spindexer" + } + }, + { + "type": "path", + "data": { + "pathName": "Center Drop Back Path" + } + }, + { + "type": "named", + "data": { + "name": "Stop Hood Down" + } + }, + { + "type": "named", + "data": { + "name": "Extend Intake" + } + }, + { + "type": "named", + "data": { + "name": "Start Spindexer" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Left Do Nothing.auto b/src/main/deploy/pathplanner/autos/Left Do Nothing.auto new file mode 100644 index 0000000..34ae3f2 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Left Do Nothing.auto @@ -0,0 +1,49 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Hood Down" + } + }, + { + "type": "named", + "data": { + "name": "Stop Spindexer" + } + }, + { + "type": "path", + "data": { + "pathName": "Left Drop Back Path" + } + }, + { + "type": "named", + "data": { + "name": "Stop Hood Down" + } + }, + { + "type": "named", + "data": { + "name": "Extend Intake" + } + }, + { + "type": "named", + "data": { + "name": "Start Spindexer" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/LeftSwipeOne.auto b/src/main/deploy/pathplanner/autos/LeftSwipeOne.auto new file mode 100644 index 0000000..d7d2d62 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/LeftSwipeOne.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Left Swipe1" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/LeftSwipeTwo.auto b/src/main/deploy/pathplanner/autos/LeftSwipeTwo.auto new file mode 100644 index 0000000..ef19e46 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/LeftSwipeTwo.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Left Swipe2" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/New Auto.auto b/src/main/deploy/pathplanner/autos/New Auto.auto new file mode 100644 index 0000000..d4dfd7b --- /dev/null +++ b/src/main/deploy/pathplanner/autos/New Auto.auto @@ -0,0 +1,25 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Stop Hood Down" + } + }, + { + "type": "named", + "data": { + "name": null + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Right Do Nothing.auto b/src/main/deploy/pathplanner/autos/Right Do Nothing.auto new file mode 100644 index 0000000..e04cc7b --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Right Do Nothing.auto @@ -0,0 +1,49 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Hood Down" + } + }, + { + "type": "named", + "data": { + "name": "Stop Spindexer" + } + }, + { + "type": "path", + "data": { + "pathName": "Right Drop Back Path" + } + }, + { + "type": "named", + "data": { + "name": "Stop Hood Down" + } + }, + { + "type": "named", + "data": { + "name": "Extend Intake" + } + }, + { + "type": "named", + "data": { + "name": "Start Spindexer" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/RightSwipeOne.auto b/src/main/deploy/pathplanner/autos/RightSwipeOne.auto new file mode 100644 index 0000000..a916cb5 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/RightSwipeOne.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Right Swipe1" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/RightSwipeTwo.auto b/src/main/deploy/pathplanner/autos/RightSwipeTwo.auto new file mode 100644 index 0000000..623b9d7 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/RightSwipeTwo.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Right Swipe2" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Center Drop Back Path.path b/src/main/deploy/pathplanner/paths/Center Drop Back Path.path new file mode 100644 index 0000000..57966e8 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Center Drop Back Path.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.543, + "y": 4.217 + }, + "prevControl": null, + "nextControl": { + "x": 2.044649240494815, + "y": 4.241017071760963 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.2, + "y": 4.217 + }, + "prevControl": { + "x": 2.5070000000000006, + "y": 4.217 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 2.5, + "maxAngularVelocity": 200.0, + "maxAngularAcceleration": 300.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/ConservativeSwipe1.path b/src/main/deploy/pathplanner/paths/ConservativeSwipe1.path index aa33568..879db65 100644 --- a/src/main/deploy/pathplanner/paths/ConservativeSwipe1.path +++ b/src/main/deploy/pathplanner/paths/ConservativeSwipe1.path @@ -4,12 +4,12 @@ { "anchor": { "x": 4.5, - "y": 7.623190984573506 + "y": 7.623 }, "prevControl": null, "nextControl": { "x": 6.819805487632309, - "y": 6.775820794389796 + "y": 6.77562980981629 }, "isLocked": false, "linkedName": null diff --git a/src/main/deploy/pathplanner/paths/Left Drop Back Path.path b/src/main/deploy/pathplanner/paths/Left Drop Back Path.path new file mode 100644 index 0000000..bfb58a6 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Left Drop Back Path.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 4.5, + "y": 7.623 + }, + "prevControl": null, + "nextControl": { + "x": 3.001456767975733, + "y": 7.623 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 3.2, + "y": 7.623 + }, + "prevControl": { + "x": 3.5070000000000006, + "y": 7.623 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 2.5, + "maxAngularVelocity": 200.0, + "maxAngularAcceleration": 300.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Right Drop Back Path.path b/src/main/deploy/pathplanner/paths/Right Drop Back Path.path new file mode 100644 index 0000000..b95982e --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Right Drop Back Path.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 4.5, + "y": 0.448 + }, + "prevControl": null, + "nextControl": { + "x": 3.001456767975733, + "y": 0.4480000000000002 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 3.2, + "y": 0.448 + }, + "prevControl": { + "x": 3.506999999999998, + "y": 0.44799999999999995 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 2.5, + "maxAngularVelocity": 200.0, + "maxAngularAcceleration": 300.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Right Swipe1.path b/src/main/deploy/pathplanner/paths/Right Swipe1.path index 841e744..3bd63f6 100644 --- a/src/main/deploy/pathplanner/paths/Right Swipe1.path +++ b/src/main/deploy/pathplanner/paths/Right Swipe1.path @@ -4,12 +4,12 @@ { "anchor": { "x": 4.5, - "y": 0.4481350154264931 + "y": 0.448 }, "prevControl": null, "nextControl": { "x": 6.341153730575683, - "y": 0.7322587728145628 + "y": 0.7321237573880697 }, "isLocked": false, "linkedName": null @@ -21,7 +21,7 @@ }, "prevControl": { "x": 8.155370348167532, - "y": 0.8386737269319346 + "y": 0.8386737269319345 }, "nextControl": { "x": 8.45722898958081, diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 6e53141..15c3fec 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -20,6 +20,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; import edu.wpi.first.wpilibj2.command.InstantCommand; +import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import frc.robot.commands.LogCommand; import frc.robot.commands.drive_comm.DefaultDriveCommand; import frc.robot.commands.gpm.AutoShootCommand; @@ -288,7 +289,6 @@ public class RobotContainer { */ public void autoChooserInit() { // add the options to the Chooser - String defaultAuto = "Trial Auto Path"; String leftSideAuto = "Left Week V1"; String rightSideAuto = "Right Week V1"; String shootOnlyAuto = "Shoot Only Left Week V1"; @@ -296,8 +296,11 @@ public class RobotContainer { String rightLiberalSwipe = "RightLiberalDoubleSwipe"; String leftLiberalSwipeTranslation = "LeftLiberalDoubleSwipeTranslation"; String leftConservativeSwipe = "LeftConservativeDoubleSwipe"; + String leftDoNothing = "Left Do Nothing"; + String rightDoNothing = "Right Do Nothing"; + String centerDoNothing = "Center Do Nothing"; - autoChooser.setDefaultOption("Default", new PathPlannerAuto(defaultAuto)); + autoChooser.setDefaultOption("Default", getDefaultAuto()); addAuto(leftSideAuto); addAuto(rightSideAuto); addAuto(shootOnlyAuto); @@ -305,7 +308,9 @@ public class RobotContainer { addAuto(leftLiberalSwipe); addAuto(rightLiberalSwipe); addAuto(leftLiberalSwipeTranslation); - + addAuto(leftDoNothing); + addAuto(rightDoNothing); + addAuto(centerDoNothing); // put the Chooser on the SmartDashboard SmartDashboard.putData("Auto chooser", autoChooser); @@ -334,6 +339,13 @@ public class RobotContainer { } } + public Command getDefaultAuto() { + ParallelCommandGroup defaultShoot = new ParallelCommandGroup( + new RunSpindexer(spindexer, turret, hood, intake) + ); + return defaultShoot; + } + public Command getAutoCommand() { return autoChooser.getSelected(); } -- 2.39.5