]> git.taranathan.com Git - FRC2026.git/commitdiff
added the default option
authoreileha <eileenhan369@gmail.com>
Wed, 18 Mar 2026 23:23:41 +0000 (16:23 -0700)
committereileha <eileenhan369@gmail.com>
Wed, 18 Mar 2026 23:23:41 +0000 (16:23 -0700)
src/main/deploy/pathplanner/autos/Test default auto.auto [new file with mode: 0644]
src/main/deploy/pathplanner/paths/Random default auto.path [new file with mode: 0644]
src/main/java/frc/robot/RobotContainer.java

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 (file)
index 0000000..1d68e36
--- /dev/null
@@ -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 (file)
index 0000000..4fe4915
--- /dev/null
@@ -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
index 99010c991a58ad49debbdc85cdb9a77edc5cf982..8f30498b60126f23b7e4fb472f2faa040893b123 100644 (file)
@@ -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);