From: eileha Date: Wed, 18 Mar 2026 23:23:41 +0000 (-0700) Subject: added the default option X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=6b58bf3d19b42c8f3379da49ac0d76143e8e533f;p=FRC2026.git added the default option --- diff --git a/src/main/deploy/pathplanner/autos/Test default auto.auto b/src/main/deploy/pathplanner/autos/Test default auto.auto new file mode 100644 index 0000000..1d68e36 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Test default auto.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Random default auto" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Random default auto.path b/src/main/deploy/pathplanner/paths/Random default auto.path new file mode 100644 index 0000000..4fe4915 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Random default auto.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.6, + "y": 7.623 + }, + "prevControl": null, + "nextControl": { + "x": 4.6, + "y": 7.623 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 4.0, + "y": 7.623 + }, + "prevControl": { + "x": 3.0, + "y": 7.623 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 2.0, + "maxAcceleration": 2.0, + "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/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 99010c9..8f30498 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -265,10 +265,12 @@ public class RobotContainer { // autoChooser.addOption("Spin my wheels", new DoNothing()); // autoChooser.addOption("Hello world", new InstantCommand(() -> System.out.println("Hello world"))); + String defaultAuto = "Test default auto"; String leftSideAuto = "Left Week V1"; String rightSideAuto = "Right Week V1"; String shootOnlyAuto = "Shoot Only Left Week V1"; + autoChooser.setDefaultOption("Default", new PathPlannerAuto(defaultAuto)); addAuto(leftSideAuto); addAuto(rightSideAuto); addAuto(shootOnlyAuto);