From 51ef5ff2d09dd181af2b3a03e1634132728ab8b8 Mon Sep 17 00:00:00 2001 From: Team 2648 Date: Sat, 15 Mar 2025 17:22:30 -0400 Subject: [PATCH] middle of southern maine --- .../deploy/pathplanner/autos/1 L4 Center.auto | 6 ++++++ src/main/deploy/pathplanner/autos/fein.auto | 19 ------------------- .../pathplanner/paths/New New Path.path | 13 ++++++++++--- .../deploy/pathplanner/paths/Start to H.path | 9 +-------- src/main/java/frc/robot/RobotContainer.java | 7 +++---- 5 files changed, 20 insertions(+), 34 deletions(-) delete mode 100644 src/main/deploy/pathplanner/autos/fein.auto diff --git a/src/main/deploy/pathplanner/autos/1 L4 Center.auto b/src/main/deploy/pathplanner/autos/1 L4 Center.auto index b29b219..319353d 100644 --- a/src/main/deploy/pathplanner/autos/1 L4 Center.auto +++ b/src/main/deploy/pathplanner/autos/1 L4 Center.auto @@ -4,6 +4,12 @@ "type": "sequential", "data": { "commands": [ + { + "type": "named", + "data": { + "name": "Lift L4" + } + }, { "type": "path", "data": { diff --git a/src/main/deploy/pathplanner/autos/fein.auto b/src/main/deploy/pathplanner/autos/fein.auto deleted file mode 100644 index 0e47294..0000000 --- a/src/main/deploy/pathplanner/autos/fein.auto +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "New New Path" - } - } - ] - } - }, - "resetOdom": true, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/New New Path.path b/src/main/deploy/pathplanner/paths/New New Path.path index ea34786..ff4331d 100644 --- a/src/main/deploy/pathplanner/paths/New New Path.path +++ b/src/main/deploy/pathplanner/paths/New New Path.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 4.735143442622951, + "x": 7.060758196721312, "y": 6.506454918032786 }, "prevControl": { - "x": 3.7351434426229506, + "x": 6.060758196721312, "y": 6.506454918032786 }, "nextControl": null, @@ -31,7 +31,14 @@ "rotationTargets": [], "constraintZones": [], "pointTowardsZones": [], - "eventMarkers": [], + "eventMarkers": [ + { + "name": "Lift L4", + "waypointRelativePos": 0.351851851851855, + "endWaypointRelativePos": null, + "command": null + } + ], "globalConstraints": { "maxVelocity": 4.0, "maxAcceleration": 2.5, diff --git a/src/main/deploy/pathplanner/paths/Start to H.path b/src/main/deploy/pathplanner/paths/Start to H.path index 711195e..c238bec 100644 --- a/src/main/deploy/pathplanner/paths/Start to H.path +++ b/src/main/deploy/pathplanner/paths/Start to H.path @@ -31,14 +31,7 @@ "rotationTargets": [], "constraintZones": [], "pointTowardsZones": [], - "eventMarkers": [ - { - "name": "Lift L4", - "waypointRelativePos": 0.08214624881291864, - "endWaypointRelativePos": null, - "command": null - } - ], + "eventMarkers": [], "globalConstraints": { "maxVelocity": 4.0, "maxAcceleration": 2.5, diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 3e3f6c2..aa03c21 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -228,14 +228,13 @@ public class RobotContainer { } private void configureNamedCommands() { - new EventTrigger("Lift L4").whileTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)); + new EventTrigger("Lift L4").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)); new EventTrigger("HP Pickup").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)); NamedCommands.registerCommand("Drivetrain Set X", drivetrain.setXCommand()); - NamedCommands.registerCommand("Shoot Coral L4", manipulator.runManipulator(() -> 0.4, true).withTimeout(2).andThen(manipulator.runUntilCollected(() -> 0))); + NamedCommands.registerCommand("Shoot Coral L4", Commands.race(manipulator.runManipulator(() -> 0.4, true).withTimeout(3).andThen(manipulator.runUntilCollected(() -> 0.0).withTimeout(0.1)), Commands.parallel(elevator.maintainPosition(), manipulatorPivot.maintainPosition()))); NamedCommands.registerCommand("Collect Coral", manipulator.runUntilCollected(() -> 0.30).andThen(manipulator.runUntilCollected(() -> 0)).withTimeout(0.5)); - NamedCommands.registerCommand("Lift L4", safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position) - .andThen(Commands.parallel(elevator.maintainPosition(), manipulatorPivot.maintainPosition()))); + NamedCommands.registerCommand("Lift L4", safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)); NamedCommands.registerCommand("HP Pickup", safeMoveManipulator(ElevatorConstants.kCoralIntakePosition, ManipulatorPivotConstants.kStartingPosition)); }