From 7d4d2b23ee6f3ff44ab1223c7dc8f98e7e4e5dc0 Mon Sep 17 00:00:00 2001 From: Connor Norris <99221420+ConnorJNorris@users.noreply.github.com> Date: Thu, 20 Feb 2025 20:58:23 -0700 Subject: [PATCH] changed auto elevator --- .../deploy/pathplanner/autos/Copy of T6.auto | 225 ++++++++++++++++++ src/main/deploy/pathplanner/autos/T6.auto | 25 +- src/main/java/frc/robot/RobotContainer.java | 4 +- 3 files changed, 233 insertions(+), 21 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/Copy of T6.auto diff --git a/src/main/deploy/pathplanner/autos/Copy of T6.auto b/src/main/deploy/pathplanner/autos/Copy of T6.auto new file mode 100644 index 0000000..7f245dd --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Copy of T6.auto @@ -0,0 +1,225 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Start I" + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "L4" + } + }, + { + "type": "wait", + "data": { + "waitTime": 1.2 + } + } + ] + } + } + ] + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Bottom" + } + }, + { + "type": "path", + "data": { + "pathName": "Station I" + } + } + ] + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "CoralDetect" + } + }, + { + "type": "path", + "data": { + "pathName": "Coral J" + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "CoralIntake" + } + } + ] + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "L4" + } + }, + { + "type": "wait", + "data": { + "waitTime": 1.2 + } + } + ] + } + } + ] + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Bottom" + } + }, + { + "type": "path", + "data": { + "pathName": "Station J" + } + } + ] + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "CoralDetect" + } + }, + { + "type": "path", + "data": { + "pathName": "Coral K" + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "CoralIntake" + } + } + ] + } + }, + { + "type": "race", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "L4" + } + }, + { + "type": "wait", + "data": { + "waitTime": 1.2 + } + } + ] + } + } + ] + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Bottom" + } + }, + { + "type": "path", + "data": { + "pathName": "Station K" + } + } + ] + } + } + ] + } + } + ] + } + }, + "resetOdom": true, + "folder": "T", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/T6.auto b/src/main/deploy/pathplanner/autos/T6.auto index 881fba1..9047a1a 100644 --- a/src/main/deploy/pathplanner/autos/T6.auto +++ b/src/main/deploy/pathplanner/autos/T6.auto @@ -5,7 +5,7 @@ "data": { "commands": [ { - "type": "parallel", + "type": "sequential", "data": { "commands": [ { @@ -15,32 +15,19 @@ } }, { - "type": "sequential", + "type": "race", "data": { "commands": [ { - "type": "wait", + "type": "named", "data": { - "waitTime": 1.0 + "name": "L4" } }, { - "type": "race", + "type": "wait", "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "L4" - } - }, - { - "type": "wait", - "data": { - "waitTime": 1.4 - } - } - ] + "waitTime": 1.1 } } ] diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index eceef5f..3fcf26f 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -262,8 +262,8 @@ public RobotContainer() { ElevatorConstants.kVelocity, m_elevator), Commands.run(() -> m_coralScorer.setCoralPercent(.0), m_coralScorer) - .withTimeout(1) - .andThen(Commands.run(() -> m_coralScorer.setCoralPercent(.50), m_coralScorer)))); + .withTimeout(0.8) + .andThen(Commands.run(() -> m_coralScorer.setCoralPercent(.70), m_coralScorer)))); NamedCommands.registerCommand("L3", Commands.print("L3")); // Just print commands for right now. NamedCommands.registerCommand("L2", Commands.print("L2")); NamedCommands