From eb02a28048ade35fba092747f1f59c1b910503f5 Mon Sep 17 00:00:00 2001 From: Tylr-J42 Date: Sat, 28 Mar 2026 20:24:28 -0400 Subject: [PATCH] quals day one of unh --- .../autos/MOVE B____ left to center.auto | 6 ++++ .../pathplanner/autos/left to center.auto | 6 ++++ .../My Bumpers Arent All The Way Over.path | 2 +- .../pathplanner/paths/back from center.path | 30 ++++++++----------- .../paths/over bump to pile move.path | 20 ++++++------- .../pathplanner/paths/over bump to pile.path | 16 +++++----- src/main/java/frc/robot/RobotContainer.java | 17 +++++++++-- .../frc/robot/constants/ModuleConstants.java | 2 +- 8 files changed, 60 insertions(+), 39 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/MOVE B____ left to center.auto b/src/main/deploy/pathplanner/autos/MOVE B____ left to center.auto index 25d2f5b..ade5693 100644 --- a/src/main/deploy/pathplanner/autos/MOVE B____ left to center.auto +++ b/src/main/deploy/pathplanner/autos/MOVE B____ left to center.auto @@ -61,6 +61,12 @@ ] } }, + { + "type": "named", + "data": { + "name": "aim" + } + }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/autos/left to center.auto b/src/main/deploy/pathplanner/autos/left to center.auto index 3deb51b..e768fb4 100644 --- a/src/main/deploy/pathplanner/autos/left to center.auto +++ b/src/main/deploy/pathplanner/autos/left to center.auto @@ -61,6 +61,12 @@ ] } }, + { + "type": "named", + "data": { + "name": "aim" + } + }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/paths/My Bumpers Arent All The Way Over.path b/src/main/deploy/pathplanner/paths/My Bumpers Arent All The Way Over.path index 486b7c7..075959e 100644 --- a/src/main/deploy/pathplanner/paths/My Bumpers Arent All The Way Over.path +++ b/src/main/deploy/pathplanner/paths/My Bumpers Arent All The Way Over.path @@ -69,7 +69,7 @@ }, "prevControl": { "x": 8.08578683847011, - "y": 0.4907704016028374 + "y": 0.49077040160283736 }, "nextControl": { "x": 8.318287488908608, diff --git a/src/main/deploy/pathplanner/paths/back from center.path b/src/main/deploy/pathplanner/paths/back from center.path index 4f763a5..4897561 100644 --- a/src/main/deploy/pathplanner/paths/back from center.path +++ b/src/main/deploy/pathplanner/paths/back from center.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 5.894304568527918, - "y": 5.614192893401015 + "x": 6.742194543297748, + "y": 5.589703440094898 }, "prevControl": null, "nextControl": { - "x": 5.074781725888325, - "y": 5.632609137055837 + "x": 3.68848717948718, + "y": 5.639692307692307 }, "isLocked": false, "linkedName": "after center grab" }, { "anchor": { - "x": 3.002954314720812, - "y": 5.310324873096447 + "x": 2.979166666666668, + "y": 5.2327051282051285 }, "prevControl": { - "x": 4.052680203045686, - "y": 5.9825177664974625 + "x": 3.0721923076923088, + "y": 5.721089743589744 }, "nextControl": null, "isLocked": false, @@ -30,12 +30,8 @@ ], "rotationTargets": [ { - "waypointRelativePos": 0.10454545454545605, - "rotationDegrees": -115.0 - }, - { - "waypointRelativePos": 0.7931818181818296, - "rotationDegrees": -115.0 + "waypointRelativePos": 0.11569148936170148, + "rotationDegrees": -34.71279786419313 } ], "constraintZones": [], @@ -43,7 +39,7 @@ "eventMarkers": [], "globalConstraints": { "maxVelocity": 4.0, - "maxAcceleration": 2.5, + "maxAcceleration": 3.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, @@ -56,8 +52,8 @@ "reversed": false, "folder": null, "idealStartingState": { - "velocity": 2.0, - "rotation": -129.95754893082906 + "velocity": 4.0, + "rotation": -45.365518355574764 }, "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/over bump to pile move.path b/src/main/deploy/pathplanner/paths/over bump to pile move.path index b59e02d..f251e78 100644 --- a/src/main/deploy/pathplanner/paths/over bump to pile move.path +++ b/src/main/deploy/pathplanner/paths/over bump to pile move.path @@ -48,12 +48,12 @@ }, { "anchor": { - "x": 5.894304568527918, - "y": 5.614192893401015 + "x": 6.742194543297748, + "y": 5.589703440094898 }, "prevControl": { - "x": 6.841360406091369, - "y": 5.0824238578680205 + "x": 7.758358974358975, + "y": 5.616435897435898 }, "nextControl": null, "isLocked": false, @@ -74,7 +74,7 @@ { "name": "Constraints Zone", "minWaypointRelativePos": 1.1243680485338854, - "maxWaypointRelativePos": 2.0, + "maxWaypointRelativePos": 2.077102803738317, "constraints": { "maxVelocity": 1.0, "maxAcceleration": 1.5, @@ -95,16 +95,16 @@ } ], "globalConstraints": { - "maxVelocity": 2.0, - "maxAcceleration": 1.5, + "maxVelocity": 4.0, + "maxAcceleration": 2.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { - "velocity": 3.0, - "rotation": -129.95754893082906 + "velocity": 4.0, + "rotation": -45.365518355574764 }, "reversed": false, "folder": null, @@ -112,5 +112,5 @@ "velocity": 0, "rotation": -129.95754893082906 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/over bump to pile.path b/src/main/deploy/pathplanner/paths/over bump to pile.path index 9ea517f..f39b75e 100644 --- a/src/main/deploy/pathplanner/paths/over bump to pile.path +++ b/src/main/deploy/pathplanner/paths/over bump to pile.path @@ -48,12 +48,12 @@ }, { "anchor": { - "x": 5.894304568527918, - "y": 5.614192893401015 + "x": 6.742194543297748, + "y": 5.589703440094898 }, "prevControl": { - "x": 6.750659898477156, - "y": 5.614192893401015 + "x": 7.598549873246986, + "y": 5.589703440094898 }, "nextControl": null, "isLocked": false, @@ -95,16 +95,16 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, + "maxVelocity": 4.0, + "maxAcceleration": 2.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { - "velocity": 3.0, - "rotation": -129.95754893082906 + "velocity": 4.0, + "rotation": -45.365518355574764 }, "reversed": false, "folder": null, diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index cabc6b2..077da2e 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -435,8 +435,21 @@ public class RobotContainer { ).withTimeout(3).andThen(spindexer.instantaneousStop())); - NamedCommands.registerCommand("auto shoot", hood.trackToAnglePoseBased(drivetrain, shooter) - .alongWith(shooter.maintainSpeed(ShooterSpeeds.kHubSpeed), spindexer.spinToShooter(), intakePivot.jimmy(0.5))); + NamedCommands.registerCommand("aim", + hood.trackToAnglePoseBased(drivetrain, shooter) + .alongWith( + shooter.maintainSpeed(ShooterSpeeds.kHubSpeed), + intakePivot.jimmy(0.5), + drivetrain.lockRotationToHub(() -> 0.0, () -> 0.0, false)) + .withTimeout(0.5)); + + NamedCommands.registerCommand("auto shoot", + hood.trackToAnglePoseBased(drivetrain, shooter) + .alongWith( + shooter.maintainSpeed(ShooterSpeeds.kHubSpeed), + spindexer.spinToShooter(), + intakePivot.jimmy(0.5), + drivetrain.lockRotationToHub(() -> 0.0, () -> 0.0, false))); } public Command getAutonomousCommand() { diff --git a/src/main/java/frc/robot/constants/ModuleConstants.java b/src/main/java/frc/robot/constants/ModuleConstants.java index 8b7276c..c350053 100644 --- a/src/main/java/frc/robot/constants/ModuleConstants.java +++ b/src/main/java/frc/robot/constants/ModuleConstants.java @@ -56,7 +56,7 @@ public class ModuleConstants { // TODO Hold over from 2025, adjust? public static final int kDriveMotorStatorCurrentLimit = 90; - public static final int kDriveMotorSupplyCurrentLimit = 55; + public static final int kDriveMotorSupplyCurrentLimit = 40; // TODO Hold over from 2025, adjust? public static final InvertedValue kDriveInversionState = InvertedValue.Clockwise_Positive;