From 7b93f952792ea37bfaa8e6e6812ecfcf21e8e2ba Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Thu, 12 Feb 2026 19:45:54 -0800 Subject: [PATCH 1/8] Made a stop rollers command for automodes --- .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index d7f18df..2f07bef 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -118,6 +118,14 @@ public Command stowCmd() { .withTimeout(2)).withName("Stow Intake"); } + /** + * Command that stops the rollers, mainly for in automodes + * @return + */ + public Command stopIntake(){ + return runOnce(() -> stopIntaking()).withName("Stop Rollers"); + } + /** * Command that deploys the intake and ends when it gets there. * @return From 13a277b0b43938a48bfcf284544a33281db72539 Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 10:13:04 -0800 Subject: [PATCH 2/8] Started --- .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index d7f18df..0b72a75 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -69,6 +69,10 @@ private void stopIntaking() { io.stopRoller(); } + private void eject(){ + io.setRollerVoltage() + } + /** * Stows the intake and hopper. */ From 5196d02e3ea262aeb6b49d004c7f3b0cc5d6283f Mon Sep 17 00:00:00 2001 From: Adam Mahmoud Date: Sat, 14 Feb 2026 10:17:01 -0800 Subject: [PATCH 3/8] Made Eject Command --- .../java/frc/robot/subsystems/intake/IntakeConstants.java | 1 + .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java b/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java index f2d74d3..8f639b1 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java @@ -52,6 +52,7 @@ public final class IntakeConstants { public static final AngularVelocity rollerMaxVelocity= DegreesPerSecond.of(360); //Temporary speed to be changed as needed public static final Voltage rollerCollectVoltage= Volts.of(6); //Temporary voltage + public static final Voltage rollerEjectVoltage= Volts.of(-6); //Temporary voltage public static final Angle pivotTolerance = Degrees.of(5); //Tolerance to compare current angle to target diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 0b72a75..4b675b3 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -70,7 +70,7 @@ private void stopIntaking() { } private void eject(){ - io.setRollerVoltage() + io.setRollerVoltage(IntakeConstants.rollerEjectVoltage); } /** @@ -154,6 +154,12 @@ public Command intakeSequence() { ).finallyDo(interrupted -> waiting()); } + public Command ejectSequence() { + return runOnce(this::eject).beforeStarting( + deployCmd().unless(this::isIntakeDeployed) + ).finallyDo(interrupted -> waiting()); + } + //////////////////////////// /// Sys ID Routine creation/ /// //////////////////////// From 55f7c385d35c0203efd7f666b7f04ca5dc341dee Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 10:21:59 -0800 Subject: [PATCH 4/8] Gamepad binding to eject intake sequence --- src/main/java/frc/robot/RobotContainer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index c1e16f7..3738558 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -326,6 +326,9 @@ private void configureBindings() { // When the shooter isnt shooting, get it ready to shoot. shooter_.setDefaultCommand(shooter_.awaitShooting(drivebase_::getPose)); + + //While the A button is held, the intake will run the eject sequence. If it the intake is stowed, it will also deploy it. + gamepad_.a().whileTrue(intake_.ejectSequence()); } private void configureDriveBindings() { From d3013b9db3df25e9ede50e260bcbb2797ba744e2 Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 10:35:09 -0800 Subject: [PATCH 5/8] Finished eject command --- src/main/java/frc/robot/Constants.java | 2 +- .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index a763ab7..dfa034a 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -36,7 +36,7 @@ public final class Constants { // Sets the currently running robot. Change to SIMBOT when running the // desktop physics simulation so AdvantageKit runs in SIM mode instead of // falling back to REPLAY. - private static final RobotType robotType = RobotType.COMPETITION; + private static final RobotType robotType = RobotType.SIMBOT; public static final boolean spawnLessFuelInSim = true; diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 4b675b3..2b3099c 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -154,8 +154,12 @@ public Command intakeSequence() { ).finallyDo(interrupted -> waiting()); } + public Command runEjectCmd() { + return startEnd(this::eject, this::stopIntaking); + } + public Command ejectSequence() { - return runOnce(this::eject).beforeStarting( + return runEjectCmd().beforeStarting( deployCmd().unless(this::isIntakeDeployed) ).finallyDo(interrupted -> waiting()); } From 98f2a3b4f1b7853f2d4fa2673efb18f4893f792d Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 11:50:35 -0800 Subject: [PATCH 6/8] Done --- src/main/java/frc/robot/Constants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index dfa034a..a763ab7 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -36,7 +36,7 @@ public final class Constants { // Sets the currently running robot. Change to SIMBOT when running the // desktop physics simulation so AdvantageKit runs in SIM mode instead of // falling back to REPLAY. - private static final RobotType robotType = RobotType.SIMBOT; + private static final RobotType robotType = RobotType.COMPETITION; public static final boolean spawnLessFuelInSim = true; From 376f845b988e46f8e0df7ed8a18d341d5812445f Mon Sep 17 00:00:00 2001 From: Pranav Date: Mon, 16 Feb 2026 20:21:00 -0800 Subject: [PATCH 7/8] Fixed climb position to reflect new climber, back right of bot --- .../deploy/pathplanner/paths/Shoot2 To Climb.path | 12 ++++++------ src/main/deploy/pathplanner/paths/ShootToClimb.path | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/deploy/pathplanner/paths/Shoot2 To Climb.path b/src/main/deploy/pathplanner/paths/Shoot2 To Climb.path index e4dfa40..1f195db 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2 To Climb.path +++ b/src/main/deploy/pathplanner/paths/Shoot2 To Climb.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 1.5481222222222222, - "y": 3.752822222222222 + "x": 0.7419, + "y": 2.664422222222222 }, "prevControl": { - "x": 2.0147248545881693, - "y": 2.880077770320452 + "x": 1.2085026323659471, + "y": 1.7916777703204518 }, "nextControl": null, "isLocked": false, @@ -42,10 +42,10 @@ }, "goalEndState": { "velocity": 0, - "rotation": -0.939190945735607 + "rotation": 180.0 }, "reversed": false, - "folder": "Neutral Zone Climb", + "folder": null, "idealStartingState": { "velocity": 0, "rotation": 59.058463533677475 diff --git a/src/main/deploy/pathplanner/paths/ShootToClimb.path b/src/main/deploy/pathplanner/paths/ShootToClimb.path index 9222673..a86a838 100644 --- a/src/main/deploy/pathplanner/paths/ShootToClimb.path +++ b/src/main/deploy/pathplanner/paths/ShootToClimb.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 1.5380444444444445, - "y": 3.7125111111111115 + "x": 1.3667222222222224, + "y": 4.871455555555555 }, "prevControl": { - "x": 1.920864779920239, - "y": 3.7581512560925034 + "x": 1.7495425576980168, + "y": 4.917095700536947 }, "nextControl": null, "isLocked": false, From be5ac2ca7179e4b128a74a952fa7d7aee66e66ce Mon Sep 17 00:00:00 2001 From: blaze-developer Date: Mon, 16 Feb 2026 20:23:14 -0800 Subject: [PATCH 8/8] Add new pose reset for initial paths --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- src/main/java/frc/robot/commands/drive/DriveCommands.java | 8 +++++++- src/main/java/frc/robot/util/MapleSimUtil.java | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 3738558..36619f4 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -288,8 +288,8 @@ public RobotContainer() { autoChooser_ = new LoggedDashboardChooser<>("Auto Choices"); autoChooser_.onChange(auto -> { - System.err.println("Auto \"" + auto.getName() + "\" selected!"); - // This should be used to set up robot position setting, initialization, etc. + System.out.println("Auto \"" + auto.getName() + "\" selected!"); + // Anything you may want to do when the auto is selected. }); // Test Bindings diff --git a/src/main/java/frc/robot/commands/drive/DriveCommands.java b/src/main/java/frc/robot/commands/drive/DriveCommands.java index 167fbcf..db9befe 100644 --- a/src/main/java/frc/robot/commands/drive/DriveCommands.java +++ b/src/main/java/frc/robot/commands/drive/DriveCommands.java @@ -62,6 +62,7 @@ import frc.robot.Constants.FieldConstants; import frc.robot.Constants.Mode; import frc.robot.subsystems.drive.Drive; +import frc.robot.util.MapleSimUtil; public class DriveCommands { private static final double kStoppedVelocity = 0.15 ; @@ -593,10 +594,15 @@ public static Command initialFollowPathCommand(Drive drive, String pathName, boo return Commands.none(); } + var startingPose = initPosePath.getStartingHolonomicPose().orElseThrow(); + return Commands.sequence( setPoseCommand( drive, - initPosePath.getStartingHolonomicPose().orElseThrow(), false), + startingPose, + false + ), + Commands.runOnce(() -> MapleSimUtil.placeRobotOnField(startingPose)), AutoBuilder.followPath(path.get())); } diff --git a/src/main/java/frc/robot/util/MapleSimUtil.java b/src/main/java/frc/robot/util/MapleSimUtil.java index 4645c33..286406f 100644 --- a/src/main/java/frc/robot/util/MapleSimUtil.java +++ b/src/main/java/frc/robot/util/MapleSimUtil.java @@ -137,6 +137,10 @@ public static Pose2d getPosition() { return drivebaseSimulation.getSimulatedDriveTrainPose(); } + public static void placeRobotOnField(Pose2d pose) { + drivebaseSimulation.setSimulationWorldPose(pose); + } + public static ChassisSpeeds getFieldChassisSpeeds() { return drivebaseSimulation.getDriveTrainSimulatedChassisSpeedsFieldRelative(); }