diff --git a/simgui-ds.json b/simgui-ds.json index 73cc713..4a63cc1 100644 --- a/simgui-ds.json +++ b/simgui-ds.json @@ -1,4 +1,9 @@ { + "System Joysticks": { + "window": { + "enabled": false + } + }, "keyboardJoysticks": [ { "axisConfig": [ diff --git a/src/main/deploy/pathplanner/autos/DriveShoot-Hori.auto b/src/main/deploy/pathplanner/autos/DriveShoot-Hori.auto index cd4f4d0..8765ce9 100644 --- a/src/main/deploy/pathplanner/autos/DriveShoot-Hori.auto +++ b/src/main/deploy/pathplanner/autos/DriveShoot-Hori.auto @@ -4,10 +4,22 @@ "type": "sequential", "data": { "commands": [ + { + "type": "named", + "data": { + "name": "Robot Rev Up" + } + }, { "type": "parallel", "data": { "commands": [ + { + "type": "named", + "data": { + "name": "Robot Shoot" + } + }, { "type": "path", "data": { @@ -19,12 +31,6 @@ "data": { "name": "Robot Shoot Driving" } - }, - { - "type": "named", - "data": { - "name": "Robot Shoot" - } } ] } diff --git a/src/main/java/frc4388/robot/Robot.java b/src/main/java/frc4388/robot/Robot.java index 95a7513..42c6f2c 100644 --- a/src/main/java/frc4388/robot/Robot.java +++ b/src/main/java/frc4388/robot/Robot.java @@ -154,8 +154,8 @@ public class Robot extends LoggedRobot { double rumble = (info.remainingInShift() < 5. && info.remainingInShift() > 0.1) ? 1 : 0; - m_robotContainer.getDeadbandedDriverController().setRumble(RumbleType.kBothRumble, rumble); - m_robotContainer.getDeadbandedOperatorController().setRumble(RumbleType.kBothRumble, rumble); + // m_robotContainer.getDeadbandedDriverController().setRumble(RumbleType.kBothRumble, rumble); + // m_robotContainer.getDeadbandedOperatorController().setRumble(RumbleType.kBothRumble, rumble); } /** diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index bc6ded9..46eb3b0 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -153,7 +153,7 @@ public class RobotContainer { //new AutoAlign(m_robotSwerveDrive, m_vision, new Pose2d(FieldPositions.HUB_POSITION, new Rotation2d(0)), false), new WaitUntilCommand(m_robotShooter::isShooterUpToSpeed), new InstantCommand(()-> m_robotShooter.allowShooting(), m_robotShooter), - new WaitCommand(2), + new WaitCommand(5), IntakeRetracted, new WaitCommand(5), new InstantCommand(() -> m_robotShooter.denyShooting(), m_robotShooter), diff --git a/src/main/java/frc4388/robot/constants/BuildConstants.java b/src/main/java/frc4388/robot/constants/BuildConstants.java index 2ac3242..8126120 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 = 171; - public static final String GIT_SHA = "08f1e26f3a6a9eefad99783748191b0d98056b07"; - public static final String GIT_DATE = "2026-03-19 16:06:31 MDT"; - public static final String GIT_BRANCH = "gurt"; - public static final String BUILD_DATE = "2026-03-19 16:29:01 MDT"; - public static final long BUILD_UNIX_TIME = 1773959341836L; + public static final int GIT_REVISION = 180; + public static final String GIT_SHA = "89a1f34a4a4751acadc1509890fed15d6d870930"; + public static final String GIT_DATE = "2026-03-20 23:50:03 MDT"; + public static final String GIT_BRANCH = "MiraOrg"; + public static final String BUILD_DATE = "2026-03-21 13:00:47 MDT"; + public static final long BUILD_UNIX_TIME = 1774119647384L; public static final int DIRTY = 1; private BuildConstants(){} diff --git a/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java b/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java index 36df512..a131d10 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java @@ -133,8 +133,7 @@ public class Shooter extends SubsystemBase { chassisSpeeds.vyMetersPerSecond ); Translation2d fieldPosLead = robotSpeed.times(ShooterConstants.AIM_LEAD_TIME.get()).plus(FieldPositions.HUB_POSITION); - Rotation2d ang = m_SwerveDrive.getPose2d().getTranslation().minus(fieldPosLead).getAngle(); - + Rotation2d ang = m_SwerveDrive.getPose2d().getTranslation().minus(fieldPosLead).getAngle().minus(m_SwerveDrive.getPose2d().getRotation()); Pose2d robotPose2d = m_SwerveDrive.getPose2d(); if (TimesNegativeOne.isRed) { @@ -154,7 +153,8 @@ public class Shooter extends SubsystemBase { // XYSpeed <= ShooterConstants.ROBOT_SPEED_TOLERANCE.get() | // AngSpeed <= ShooterConstants.ROBOT_ANG_SPEED_TOLERANCE.get() | distanceToHub <= ShooterConstants.ROBOT_MIN_HUB.get() | - distanceToHub >= ShooterConstants.ROBOT_MAX_HUB.get(); + distanceToHub >= ShooterConstants.ROBOT_MAX_HUB.get() | + Math.abs(ang.getDegrees()) > ShooterConstants.AIM_ANGLE.get(); double shooterSpeed = Math.abs(state.motor1Velocity.in(RotationsPerSecond) + state.motor2Velocity.in(RotationsPerSecond)) / 2; @@ -186,9 +186,7 @@ public class Shooter extends SubsystemBase { break; case 0b001: // No errors and shoot button is pressed - if (ang.getDegrees() < ShooterConstants.AIM_ANGLE.get()){ // robot is aimed at hub io.setIndexerOutput(state, ShooterConstants.INDEXER_FORWARD_OUTPUT.get()); - } m_robotLED.setMode(Constants.LEDConstants.OPREADY); break; diff --git a/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java index 816b953..6c1b4a9 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java @@ -45,7 +45,7 @@ public class ShooterConstants { public static final ConfigurableDouble ROBOT_MIN_HUB = new ConfigurableDouble("Shoot min dist M", 1.8); public static final ConfigurableDouble ROBOT_MAX_HUB = new ConfigurableDouble("Shoot max dist M", 4.8); - public static final ConfigurableDouble AIM_ANGLE = new ConfigurableDouble("Aim angle tolerance", 5); + public static final ConfigurableDouble AIM_ANGLE = new ConfigurableDouble("Aim angle tolerance", 15); public static final ConfigurableDouble ROBOT_ANG_TOLERANCE = new ConfigurableDouble("Ang tolerance DEG", 360); public static final ConfigurableDouble ROBOT_SPEED_TOLERANCE = new ConfigurableDouble("Speed tolerance MS", 1); diff --git a/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java b/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java index f78a10a..b7e43d4 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java @@ -57,22 +57,22 @@ public class ShooterReal implements ShooterIO { @Override public void motorStalled(ShooterState state, Intake m_Intake, LED m_robotLED) { motorStall = ""; - // if (Math.abs(state.motor1TargetVelocity.in(RotationsPerSecond)) - Math.abs(state.motor1Velocity.in(RotationsPerSecond)) > 40) { - // if (!m_shooterStalling) { - // m_shooterStalling = true; - // m_stallTimerShooter.restart(); - // } - // if (m_stallTimerShooter.hasElapsed(5.0)) { - // m_robotLED.setMode(Constants.LEDConstants.MOTOR_STALLED); - // motorStall = "Shooter Stalled"; - // System.out.println("Shooter Stalled: " + (Math.abs(state.motor1TargetVelocity.in(RotationsPerSecond)) - Math.abs(state.motor1Velocity.in(RotationsPerSecond)))); - // System.out.println("Target Velocity: " + Math.abs(state.motor1TargetVelocity.in(RotationsPerSecond))); - // System.out.println("Actual Velocity: " + Math.abs(state.motor1Velocity.in(RotationsPerSecond))); - // } - // } else { - // m_shooterStalling = false; - // m_stallTimerShooter.reset(); - // } + if (Math.abs(state.motor1TargetVelocity.in(RotationsPerSecond)) - Math.abs(state.motor1Velocity.in(RotationsPerSecond)) > 40) { + if (!m_shooterStalling) { + m_shooterStalling = true; + m_stallTimerShooter.restart(); + } + if (m_stallTimerShooter.hasElapsed(5.0)) { + m_robotLED.setMode(Constants.LEDConstants.MOTOR_STALLED); + motorStall = "Shooter Stalled"; + System.out.println("Shooter Stalled: " + (Math.abs(state.motor1TargetVelocity.in(RotationsPerSecond)) - Math.abs(state.motor1Velocity.in(RotationsPerSecond)))); + System.out.println("Target Velocity: " + Math.abs(state.motor1TargetVelocity.in(RotationsPerSecond))); + System.out.println("Actual Velocity: " + Math.abs(state.motor1Velocity.in(RotationsPerSecond))); + } + } else { + m_shooterStalling = false; + m_stallTimerShooter.reset(); + } if (Math.abs(state.indexerTargetOutput) - Math.abs(state.indexerOutput) > 0.3) { if (!m_indexerStalling) {