From 0957729c8024df6831cb58b994fdac186f7bba62 Mon Sep 17 00:00:00 2001 From: Shikhar Date: Thu, 5 Mar 2026 23:12:50 -0700 Subject: [PATCH] Autos for Pike --- .../pathplanner/autos/HubLeft-Score-Push.auto | 12 +- .../autos/HubLeft-Score-Tower ❌.auto | 43 ------- .../autos/HubRight-Score-Push.auto | 12 +- ... ❌.auto => ★HubCenter-Station-Score.auto} | 10 +- ...HubLeft-Score.auto => ★HubLeft-Score.auto} | 0 .../pathplanner/paths/Center-Hub-Shoot.path | 6 +- .../pathplanner/paths/Center-NeutralL.path | 2 +- .../pathplanner/paths/Center-NeutralR.path | 2 +- .../pathplanner/paths/Center-ToDepot.path | 2 +- .../paths/HubCenter-PlayerStation.path | 107 ++++++++++++++++++ .../paths/HubFarLeft-NeutralZone.path | 4 +- .../paths/HubFarRight-NeutralZone.path | 2 +- .../pathplanner/paths/HubLeft-Shoot.path | 2 +- .../pathplanner/paths/HubRight-Shoot.path | 2 +- .../deploy/pathplanner/paths/LShoot-Nu.path | 6 +- .../deploy/pathplanner/paths/ReadyPush.path | 4 +- src/main/deploy/pathplanner/settings.json | 2 +- .../java/frc4388/robot/RobotContainer.java | 6 +- .../robot/constants/BuildConstants.java | 12 +- .../robot/subsystems/intake/Intake.java | 6 +- 20 files changed, 152 insertions(+), 90 deletions(-) delete mode 100644 src/main/deploy/pathplanner/autos/HubLeft-Score-Tower ❌.auto rename src/main/deploy/pathplanner/autos/{HubRight-Station-Score-Tower ❌.auto => ★HubCenter-Station-Score.auto} (83%) rename src/main/deploy/pathplanner/autos/{HubLeft-Score.auto => ★HubLeft-Score.auto} (100%) create mode 100644 src/main/deploy/pathplanner/paths/HubCenter-PlayerStation.path diff --git a/src/main/deploy/pathplanner/autos/HubLeft-Score-Push.auto b/src/main/deploy/pathplanner/autos/HubLeft-Score-Push.auto index a304050..2a68b64 100644 --- a/src/main/deploy/pathplanner/autos/HubLeft-Score-Push.auto +++ b/src/main/deploy/pathplanner/autos/HubLeft-Score-Push.auto @@ -28,18 +28,18 @@ "name": "Robot Shoot" } }, - { - "type": "path", - "data": { - "pathName": "LShoot-Nu" - } - }, { "type": "named", "data": { "name": "Intake Extended" } }, + { + "type": "path", + "data": { + "pathName": "LShoot-Nu" + } + }, { "type": "path", "data": { diff --git a/src/main/deploy/pathplanner/autos/HubLeft-Score-Tower ❌.auto b/src/main/deploy/pathplanner/autos/HubLeft-Score-Tower ❌.auto deleted file mode 100644 index 3c5a2f8..0000000 --- a/src/main/deploy/pathplanner/autos/HubLeft-Score-Tower ❌.auto +++ /dev/null @@ -1,43 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Intake Extended" - } - }, - { - "type": "named", - "data": { - "name": "Robot Rev Up" - } - }, - { - "type": "path", - "data": { - "pathName": "HubLeft-Shoot" - } - }, - { - "type": "named", - "data": { - "name": "Robot Shoot" - } - }, - { - "type": "path", - "data": { - "pathName": "LShoot-Tower" - } - } - ] - } - }, - "resetOdom": true, - "folder": "HubLeft", - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/HubRight-Score-Push.auto b/src/main/deploy/pathplanner/autos/HubRight-Score-Push.auto index 8663bd4..519dd4a 100644 --- a/src/main/deploy/pathplanner/autos/HubRight-Score-Push.auto +++ b/src/main/deploy/pathplanner/autos/HubRight-Score-Push.auto @@ -28,18 +28,18 @@ "name": "Robot Shoot" } }, - { - "type": "path", - "data": { - "pathName": "ReadyPush" - } - }, { "type": "named", "data": { "name": "Intake Extended" } }, + { + "type": "path", + "data": { + "pathName": "ReadyPush" + } + }, { "type": "path", "data": { diff --git a/src/main/deploy/pathplanner/autos/HubRight-Station-Score-Tower ❌.auto b/src/main/deploy/pathplanner/autos/★HubCenter-Station-Score.auto similarity index 83% rename from src/main/deploy/pathplanner/autos/HubRight-Station-Score-Tower ❌.auto rename to src/main/deploy/pathplanner/autos/★HubCenter-Station-Score.auto index 9f13034..17eb54f 100644 --- a/src/main/deploy/pathplanner/autos/HubRight-Station-Score-Tower ❌.auto +++ b/src/main/deploy/pathplanner/autos/★HubCenter-Station-Score.auto @@ -11,7 +11,7 @@ { "type": "path", "data": { - "pathName": "HubRight-PlayerStation" + "pathName": "HubCenter-PlayerStation" } }, { @@ -46,17 +46,11 @@ "data": { "name": "Robot Shoot" } - }, - { - "type": "path", - "data": { - "pathName": "RShoot-Tower" - } } ] } }, "resetOdom": true, - "folder": "HubRight", + "folder": "HubCenter", "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/HubLeft-Score.auto b/src/main/deploy/pathplanner/autos/★HubLeft-Score.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/HubLeft-Score.auto rename to src/main/deploy/pathplanner/autos/★HubLeft-Score.auto diff --git a/src/main/deploy/pathplanner/paths/Center-Hub-Shoot.path b/src/main/deploy/pathplanner/paths/Center-Hub-Shoot.path index c4eca2a..5b245a0 100644 --- a/src/main/deploy/pathplanner/paths/Center-Hub-Shoot.path +++ b/src/main/deploy/pathplanner/paths/Center-Hub-Shoot.path @@ -33,11 +33,11 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, - "nominalVoltage": 10.0, + "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { @@ -50,5 +50,5 @@ "velocity": 0, "rotation": 180.0 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Center-NeutralL.path b/src/main/deploy/pathplanner/paths/Center-NeutralL.path index 3cb5237..78cf2b4 100644 --- a/src/main/deploy/pathplanner/paths/Center-NeutralL.path +++ b/src/main/deploy/pathplanner/paths/Center-NeutralL.path @@ -33,7 +33,7 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/Center-NeutralR.path b/src/main/deploy/pathplanner/paths/Center-NeutralR.path index efd08f8..07295d3 100644 --- a/src/main/deploy/pathplanner/paths/Center-NeutralR.path +++ b/src/main/deploy/pathplanner/paths/Center-NeutralR.path @@ -33,7 +33,7 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/Center-ToDepot.path b/src/main/deploy/pathplanner/paths/Center-ToDepot.path index fd5764d..d24724a 100644 --- a/src/main/deploy/pathplanner/paths/Center-ToDepot.path +++ b/src/main/deploy/pathplanner/paths/Center-ToDepot.path @@ -33,7 +33,7 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/HubCenter-PlayerStation.path b/src/main/deploy/pathplanner/paths/HubCenter-PlayerStation.path new file mode 100644 index 0000000..14a36ff --- /dev/null +++ b/src/main/deploy/pathplanner/paths/HubCenter-PlayerStation.path @@ -0,0 +1,107 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.5541168091168096, + "y": 4.0 + }, + "prevControl": null, + "nextControl": { + "x": 2.8047435897435893, + "y": 3.957478632478633 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.5, + "y": 4.0 + }, + "prevControl": { + "x": 2.778903133903134, + "y": 4.319245014245015 + }, + "nextControl": { + "x": 1.995141221800707, + "y": 3.422116038703489 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 1.5754761904761914, + "y": 1.0 + }, + "prevControl": { + "x": 2.2272563574654534, + "y": 0.9727386663284083 + }, + "nextControl": { + "x": 0.9236960234869294, + "y": 1.0272613336715914 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 0.46, + "y": 1.0 + }, + "prevControl": { + "x": 0.709742135052909, + "y": 0.9886480847776856 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [ + { + "fieldPosition": { + "x": 0.0, + "y": 0.7 + }, + "rotationOffset": 180.0, + "minWaypointRelativePos": 0.8486842105263119, + "maxWaypointRelativePos": 1.95, + "name": "Point Towards Zone" + }, + { + "fieldPosition": { + "x": 0.0, + "y": 4.0 + }, + "rotationOffset": 180.0, + "minWaypointRelativePos": 0.0, + "maxWaypointRelativePos": 0.7515182186234766, + "name": "Point Towards Zone" + } + ], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 600.0, + "maxAngularAcceleration": 750.0, + "nominalVoltage": 10.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": -95.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/HubFarLeft-NeutralZone.path b/src/main/deploy/pathplanner/paths/HubFarLeft-NeutralZone.path index 7971bc9..55a2f3a 100644 --- a/src/main/deploy/pathplanner/paths/HubFarLeft-NeutralZone.path +++ b/src/main/deploy/pathplanner/paths/HubFarLeft-NeutralZone.path @@ -96,11 +96,11 @@ ], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, - "nominalVoltage": 10.0, + "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { diff --git a/src/main/deploy/pathplanner/paths/HubFarRight-NeutralZone.path b/src/main/deploy/pathplanner/paths/HubFarRight-NeutralZone.path index a4f6aef..f5dfe28 100644 --- a/src/main/deploy/pathplanner/paths/HubFarRight-NeutralZone.path +++ b/src/main/deploy/pathplanner/paths/HubFarRight-NeutralZone.path @@ -96,7 +96,7 @@ ], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/HubLeft-Shoot.path b/src/main/deploy/pathplanner/paths/HubLeft-Shoot.path index 7d92243..d629e71 100644 --- a/src/main/deploy/pathplanner/paths/HubLeft-Shoot.path +++ b/src/main/deploy/pathplanner/paths/HubLeft-Shoot.path @@ -44,7 +44,7 @@ ], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/HubRight-Shoot.path b/src/main/deploy/pathplanner/paths/HubRight-Shoot.path index 88c4f46..9f25f6d 100644 --- a/src/main/deploy/pathplanner/paths/HubRight-Shoot.path +++ b/src/main/deploy/pathplanner/paths/HubRight-Shoot.path @@ -44,7 +44,7 @@ ], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.8, + "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/LShoot-Nu.path b/src/main/deploy/pathplanner/paths/LShoot-Nu.path index f936599..d56ea91 100644 --- a/src/main/deploy/pathplanner/paths/LShoot-Nu.path +++ b/src/main/deploy/pathplanner/paths/LShoot-Nu.path @@ -20,8 +20,8 @@ "y": 7.4 }, "prevControl": { - "x": 2.460880952380954, - "y": 7.55502380952381 + "x": 1.7698333333333336, + "y": 7.036738095238095 }, "nextControl": null, "isLocked": false, @@ -33,7 +33,7 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 1.0, + "maxVelocity": 2.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, "maxAngularAcceleration": 750.0, diff --git a/src/main/deploy/pathplanner/paths/ReadyPush.path b/src/main/deploy/pathplanner/paths/ReadyPush.path index 21b4ef2..124858d 100644 --- a/src/main/deploy/pathplanner/paths/ReadyPush.path +++ b/src/main/deploy/pathplanner/paths/ReadyPush.path @@ -47,7 +47,7 @@ "maxVelocity": 3.0, "maxAcceleration": 3.0, "maxAngularVelocity": 600.0, - "maxAngularAcceleration": 770.0, + "maxAngularAcceleration": 750.0, "nominalVoltage": 12.0, "unlimited": false }, @@ -61,5 +61,5 @@ "velocity": 0, "rotation": -148.82 }, - "useDefaultConstraints": false + "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/settings.json b/src/main/deploy/pathplanner/settings.json index e37f831..6cd0c54 100644 --- a/src/main/deploy/pathplanner/settings.json +++ b/src/main/deploy/pathplanner/settings.json @@ -8,7 +8,7 @@ "HubRight", "HubLeft" ], - "defaultMaxVel": 2.8, + "defaultMaxVel": 3.0, "defaultMaxAccel": 3.0, "defaultMaxAngVel": 600.0, "defaultMaxAngAccel": 750.0, diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 052c17d..98f3f0a 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -121,9 +121,9 @@ public class RobotContainer { // ); private Command RobotRev = new SequentialCommandGroup( - new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Idle), m_robotIntake), - new InstantCommand(() -> m_robotIntake.rollerStop(), m_robotIntake), - new InstantCommand(() -> m_robotShooter.spinUpShooting(), m_robotShooter) + new InstantCommand(() -> m_robotShooter.spinUpShooting(), m_robotShooter), + IntakeExtended, + new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.RollerStop), m_robotIntake) ); private Command RobotIntakeRetracted = new SequentialCommandGroup( diff --git a/src/main/java/frc4388/robot/constants/BuildConstants.java b/src/main/java/frc4388/robot/constants/BuildConstants.java index da11284..bf2abc4 100644 --- a/src/main/java/frc4388/robot/constants/BuildConstants.java +++ b/src/main/java/frc4388/robot/constants/BuildConstants.java @@ -7,12 +7,12 @@ public final class BuildConstants { public static final String MAVEN_GROUP = ""; public static final String MAVEN_NAME = "2026KPopRobotHunters"; public static final String VERSION = "unspecified"; - public static final int GIT_REVISION = 141; - public static final String GIT_SHA = "5b467df2cab912af2e96e94d2d51490e7da2f0bb"; - public static final String GIT_DATE = "2026-03-04 19:33:17 MST"; - public static final String GIT_BRANCH = "Autos-for-pike"; - public static final String BUILD_DATE = "2026-03-04 20:10:01 MST"; - public static final long BUILD_UNIX_TIME = 1772680201068L; + public static final int GIT_REVISION = 142; + public static final String GIT_SHA = "183caaa9700e236fb017be9702c4acc285fc6b98"; + public static final String GIT_DATE = "2026-03-05 17:22:50 MST"; + public static final String GIT_BRANCH = "master"; + public static final String BUILD_DATE = "2026-03-05 18:03:37 MST"; + public static final long BUILD_UNIX_TIME = 1772759017911L; public static final int DIRTY = 1; private BuildConstants(){} diff --git a/src/main/java/frc4388/robot/subsystems/intake/Intake.java b/src/main/java/frc4388/robot/subsystems/intake/Intake.java index c1a90ad..8425c54 100644 --- a/src/main/java/frc4388/robot/subsystems/intake/Intake.java +++ b/src/main/java/frc4388/robot/subsystems/intake/Intake.java @@ -27,7 +27,8 @@ public class Intake extends SubsystemBase { Retracted, Extending, Retracting, - Idle + Idle, + RollerStop } private IntakeMode mode = IntakeMode.Idle; @@ -90,6 +91,9 @@ public class Intake extends SubsystemBase { case Idle: io.stopArm(); break; + case RollerStop: + io.setRollerOutput(state, 0); + break; } // if (state.retractedLimit){ // this.mode = IntakeMode.Retracted;