From 8712196ab3dd40b2a92b1dd4ccd7e69922d5b73a Mon Sep 17 00:00:00 2001 From: Team578 Driver Station Date: Sat, 11 Apr 2026 15:17:30 -0400 Subject: [PATCH 1/3] Evil Racoon Man has the dumb --- .../deploy/pathplanner/autos/New Auto.auto | 6 +++++ .../pathplanner/paths/Hub to Depot.path | 26 +++++++++---------- .../deploy/pathplanner/paths/New Path.path | 12 ++++----- .../java/frc/robot/commands/ZoneCheck.java | 6 +++++ .../frc/robot/subsystems/DriveSubsystem.java | 4 +-- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/New Auto.auto b/src/main/deploy/pathplanner/autos/New Auto.auto index 268147b..b82dda5 100644 --- a/src/main/deploy/pathplanner/autos/New Auto.auto +++ b/src/main/deploy/pathplanner/autos/New Auto.auto @@ -9,6 +9,12 @@ "data": { "pathName": "New Path" } + }, + { + "type": "named", + "data": { + "name": "Shoot preload" + } } ] } diff --git a/src/main/deploy/pathplanner/paths/Hub to Depot.path b/src/main/deploy/pathplanner/paths/Hub to Depot.path index 39f3bc5..2c8714f 100644 --- a/src/main/deploy/pathplanner/paths/Hub to Depot.path +++ b/src/main/deploy/pathplanner/paths/Hub to Depot.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 13.0, - "y": 4.0 + "x": 3.5383012048192777, + "y": 3.9038674698795175 }, "prevControl": null, "nextControl": { - "x": 14.0, - "y": 4.0 + "x": 0.8527779926060135, + "y": 6.111286763858336 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 15.5, - "y": 2.0 + "x": 1.0, + "y": 6.0 }, "prevControl": { - "x": 13.5, - "y": 2.0000000000000004 + "x": 2.6290964074675798, + "y": 4.671725238604007 }, "nextControl": null, "isLocked": false, @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 1.5, + "maxAcceleration": 1.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, @@ -42,13 +42,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 0.0 + "rotation": -177.9047474356738 }, "reversed": false, "folder": null, "idealStartingState": { "velocity": 0, - "rotation": 2.6905523852280466 + "rotation": -179.99999999992184 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/New Path.path b/src/main/deploy/pathplanner/paths/New Path.path index bfa742c..eac90bb 100644 --- a/src/main/deploy/pathplanner/paths/New Path.path +++ b/src/main/deploy/pathplanner/paths/New Path.path @@ -33,16 +33,16 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, + "maxVelocity": 1.5, + "maxAcceleration": 1.5, + "maxAngularVelocity": 100.0, + "maxAngularAcceleration": 100.0, "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { "velocity": 0, - "rotation": 0.0 + "rotation": -179.02897806892076 }, "reversed": false, "folder": null, @@ -50,5 +50,5 @@ "velocity": 0, "rotation": 1.0511807495437313 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/java/frc/robot/commands/ZoneCheck.java b/src/main/java/frc/robot/commands/ZoneCheck.java index a98f6ac..8213473 100644 --- a/src/main/java/frc/robot/commands/ZoneCheck.java +++ b/src/main/java/frc/robot/commands/ZoneCheck.java @@ -41,10 +41,13 @@ public class ZoneCheck extends Command { switch (zone) { case Blue: System.out.println("BLUE"); + break; case Neutral: System.out.println("NEUTRAL"); + break; case Red: System.out.println("RED"); + break; default: System.out.println("****"); } @@ -52,10 +55,13 @@ public class ZoneCheck extends Command { switch (zone) { case Blue: System.out.println("BLUE"); + break; case Neutral: System.out.println("NEUTRAL"); + break; case Red: System.out.println("RED"); + break; default: System.out.println("****"); } diff --git a/src/main/java/frc/robot/subsystems/DriveSubsystem.java b/src/main/java/frc/robot/subsystems/DriveSubsystem.java index 65b39be..98d2ad7 100644 --- a/src/main/java/frc/robot/subsystems/DriveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/DriveSubsystem.java @@ -165,8 +165,8 @@ public class DriveSubsystem extends TestableSubsystem { driveSystem::getRobotRelativeSpeeds, (speeds, feedforwards) -> driveSystem.setChassisSpeed(speeds, new Translation2d()), new PPHolonomicDriveController( - new PIDConstants(1.5, 0, 0), - new PIDConstants(Math.PI / 2, 0, 0)), + new PIDConstants(3, 0, 0), + new PIDConstants(Math.PI, 0, 0)), config, () -> { var alliance = DriverStation.getAlliance(); From 99fe2ecfbb31bea9e5e8e070ad1280015b21efc4 Mon Sep 17 00:00:00 2001 From: Team578 Driver Station Date: Mon, 13 Apr 2026 18:20:19 -0400 Subject: [PATCH 2/3] Commiting changes from saturday --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- .../robot/commands/AutoShootCommandChassisTurret.java | 2 +- .../java/frc/robot/subsystems/HopperSubsystem.java | 11 ++++++----- .../java/frc/robot/subsystems/TurretSubsystem.java | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index c473612..affa113 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -80,10 +80,10 @@ public class RobotContainer { // m_driverController:wa.a().whileTrue(new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem)); m_driverController.leftBumper().onTrue(Commands.runOnce(() -> turretSubsystem.homeTurret(), turretSubsystem)); - m_driverController.rightBumper().onTrue(intakeSubsystem.intake()); + m_driverController.rightBumper().onTrue(Commands.parallel(intakeSubsystem.intake())); m_driverController.y().whileTrue(new RelayCommand(hopperSubsystem, turretSubsystem, intakeSubsystem)); m_driverController.start().whileTrue(intakeSubsystem.resetDeploy()); - m_driverController.x().toggleOnTrue(new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem)); + m_driverController.x().whileTrue(new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem)); m_driverController.b().toggleOnTrue(new ZoneCheck(driveSubsystem)); } diff --git a/src/main/java/frc/robot/commands/AutoShootCommandChassisTurret.java b/src/main/java/frc/robot/commands/AutoShootCommandChassisTurret.java index 0b6d64d..8ba867b 100644 --- a/src/main/java/frc/robot/commands/AutoShootCommandChassisTurret.java +++ b/src/main/java/frc/robot/commands/AutoShootCommandChassisTurret.java @@ -75,7 +75,7 @@ public class AutoShootCommandChassisTurret extends Command{ } }); - turretSubsystem.setLauncher(6000); + turretSubsystem.setLauncher(3000); turretSubsystem.setTargetElevation(Constants.ShooterConstants.DEFLECTOR_STORED_ANGLE); hopperSubsystem.spindexerOn(); cameraAutoCenterController.calculate(-100); diff --git a/src/main/java/frc/robot/subsystems/HopperSubsystem.java b/src/main/java/frc/robot/subsystems/HopperSubsystem.java index e8e4e53..8097181 100644 --- a/src/main/java/frc/robot/subsystems/HopperSubsystem.java +++ b/src/main/java/frc/robot/subsystems/HopperSubsystem.java @@ -19,6 +19,7 @@ import com.ctre.phoenix6.hardware.TalonFX; import edu.wpi.first.units.AngularVelocityUnit; import edu.wpi.first.units.Units; import edu.wpi.first.units.measure.AngularVelocity; +import edu.wpi.first.wpilibj2.command.Command; import static org.fairportrobotics.frc.posty.assertions.Assertions.*; import frc.robot.Constants; @@ -64,16 +65,16 @@ public class HopperSubsystem extends TestableSubsystem { } public void feedKicker() { - kickerMotor.setControl(kickerControl.withVelocity(1000)); - // kickerMotor.set(0.75); + //kickerMotor.setControl(kickerControl.withVelocity(1000)); + kickerMotor.set(0.75); } public void reverseKicker() { - kickerMotor.setControl(kickerControl.withVelocity(-500)); - // kickerMotor.set(-0.5); + //kickerMotor.setControl(kickerControl.withVelocity(-500)); + kickerMotor.set(-0.5); } - public void stopKicker() {kickerMotor.stopMotor();} + public void stopKicker() {kickerMotor.stopMotor();} public void spindexerOn() { spindexerMotor.set(0.75);} diff --git a/src/main/java/frc/robot/subsystems/TurretSubsystem.java b/src/main/java/frc/robot/subsystems/TurretSubsystem.java index 3391db5..9b5e753 100644 --- a/src/main/java/frc/robot/subsystems/TurretSubsystem.java +++ b/src/main/java/frc/robot/subsystems/TurretSubsystem.java @@ -104,8 +104,8 @@ public class TurretSubsystem extends TestableSubsystem { SparkMaxConfig config = new SparkMaxConfig().apply((SparkMaxConfig) SparkMaxConfig.Presets.REV_NEO); config.inverted(Constants.ShooterConstants.LAUNCHER_MOTOR_INVERTED); config.voltageCompensation(10); - config.closedLoop.p(0.0001).i(0).d(0.0); // I = 0.0000001 - config.closedLoop.feedForward.kS(0.2).kV(0.002).kA(0.00); + config.closedLoop.p(0.0002).i(0.000001).d(0.0005); // I = 0.0000001 + config.closedLoop.feedForward.kS(0.2).kV(0.000).kA(0.000); // config.closedLoop.allowedClosedLoopError(10, ClosedLoopSlot.kSlot0); config.closedLoop.feedbackSensor(FeedbackSensor.kPrimaryEncoder); config.closedLoop.positionWrappingEnabled(false); From 4859a68be6ee3a0ec258838b81fe766679ca8418 Mon Sep 17 00:00:00 2001 From: Team578 Driver Station Date: Mon, 13 Apr 2026 18:31:11 -0400 Subject: [PATCH 3/3] Updates to autos --- .../pathplanner/autos/1. Hub to Shoot.auto | 2 +- .../pathplanner/paths/1.1 Hub to Shoot.path | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 src/main/deploy/pathplanner/paths/1.1 Hub to Shoot.path diff --git a/src/main/deploy/pathplanner/autos/1. Hub to Shoot.auto b/src/main/deploy/pathplanner/autos/1. Hub to Shoot.auto index 5877b05..619ff88 100644 --- a/src/main/deploy/pathplanner/autos/1. Hub to Shoot.auto +++ b/src/main/deploy/pathplanner/autos/1. Hub to Shoot.auto @@ -7,7 +7,7 @@ { "type": "path", "data": { - "pathName": "1.1 Hub to Shoot Path" + "pathName": "1.1 Hub to Shoot" } }, { diff --git a/src/main/deploy/pathplanner/paths/1.1 Hub to Shoot.path b/src/main/deploy/pathplanner/paths/1.1 Hub to Shoot.path new file mode 100644 index 0000000..47a2903 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/1.1 Hub to Shoot.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.5, + "y": 4.0 + }, + "prevControl": null, + "nextControl": { + "x": 2.75, + "y": 4.0 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.0, + "y": 4.0 + }, + "prevControl": { + "x": 2.75, + "y": 4.0 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 177.4888349270938 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": -179.0393266954795 + }, + "useDefaultConstraints": true +} \ No newline at end of file