diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index fe22b02..8b45599 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -30,8 +30,6 @@ public void robotInit() { // Instantiate our RobotContainer. This will perform all our button bindings, and put our // autonomous chooser on the dashboard. m_robotContainer = new RobotContainer(); - // uncomment the line below if there is a USB camera plugged into the RoboRIO - // CameraServer.startAutomaticCapture(); } /** diff --git a/src/main/java/frc/robot/commands/auto/BlueFiveNote.java b/src/main/java/frc/robot/commands/auto/BlueFiveNote.java index 65ddc56..dd583c1 100644 --- a/src/main/java/frc/robot/commands/auto/BlueFiveNote.java +++ b/src/main/java/frc/robot/commands/auto/BlueFiveNote.java @@ -12,9 +12,6 @@ import frc.robot.subsystems.swerve.DriveSubsystem; import frc.robot.subsystems.vision.VisionSubsystem; -// NOTE: Consider using this command inline, rather than writing a subclass. For more -// information, see: -// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html public class BlueFiveNote extends SequentialCommandGroup { /** Creates a new FiveNotePath. */ public BlueFiveNote( diff --git a/src/main/java/frc/robot/commands/auto/RedFiveNote.java b/src/main/java/frc/robot/commands/auto/RedFiveNote.java index 6f9e958..e19eae3 100644 --- a/src/main/java/frc/robot/commands/auto/RedFiveNote.java +++ b/src/main/java/frc/robot/commands/auto/RedFiveNote.java @@ -12,9 +12,6 @@ import frc.robot.subsystems.swerve.DriveSubsystem; import frc.robot.subsystems.vision.VisionSubsystem; -// NOTE: Consider using this command inline, rather than writing a subclass. For more -// information, see: -// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html public class RedFiveNote extends SequentialCommandGroup { /** Creates a new FiveNotePath. */ public RedFiveNote( diff --git a/src/main/java/frc/robot/commands/auto/SpinUpForSpeakerAuto.java b/src/main/java/frc/robot/commands/auto/SpinUpForSpeakerAuto.java index 5e8cc25..0232b11 100644 --- a/src/main/java/frc/robot/commands/auto/SpinUpForSpeakerAuto.java +++ b/src/main/java/frc/robot/commands/auto/SpinUpForSpeakerAuto.java @@ -1,7 +1,3 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. - package frc.robot.commands.auto; import edu.wpi.first.wpilibj2.command.Command; diff --git a/src/main/java/frc/robot/commands/shooter/FlywheelSpinUpAuto.java b/src/main/java/frc/robot/commands/shooter/FlywheelSpinUpAuto.java index 917dd5c..222a31a 100644 --- a/src/main/java/frc/robot/commands/shooter/FlywheelSpinUpAuto.java +++ b/src/main/java/frc/robot/commands/shooter/FlywheelSpinUpAuto.java @@ -25,7 +25,6 @@ public FlywheelSpinUpAuto(ShooterSubsystem shooterSubsystem, DriveSubsystem driv // Called when the command is initially scheduled. @Override public void initialize() { - speakerPos = isRed ? new Translation2d(FieldConstants.RED_SPEAKER_X, FieldConstants.RED_SPEAKER_Y) diff --git a/src/main/java/frc/robot/commands/shooter/ShootPass.java b/src/main/java/frc/robot/commands/shooter/ShootPass.java index 0c789a0..a42819b 100644 --- a/src/main/java/frc/robot/commands/shooter/ShootPass.java +++ b/src/main/java/frc/robot/commands/shooter/ShootPass.java @@ -79,7 +79,6 @@ public void initialize() { @Override public void execute() { super.execute(); - // positions + distance Translation2d robotPos = driveSubsystem.getPose().getTranslation(); double distance = robotPos.getDistance(passingPos); diff --git a/src/main/java/frc/robot/extras/LimelightHelpers.java b/src/main/java/frc/robot/extras/LimelightHelpers.java index 433a422..def8d78 100644 --- a/src/main/java/frc/robot/extras/LimelightHelpers.java +++ b/src/main/java/frc/robot/extras/LimelightHelpers.java @@ -27,7 +27,6 @@ public class LimelightHelpers { public static class LimelightTarget_Retro { - @JsonProperty("t6c_ts") private double[] cameraPose_TargetSpace; @@ -261,7 +260,6 @@ public LimelightTarget_Detector() {} } public static class Results { - @JsonProperty("pID") public double pipelineID; diff --git a/src/main/java/frc/robot/extras/NoteDetector.java b/src/main/java/frc/robot/extras/NoteDetector.java index e1e6103..4858825 100644 --- a/src/main/java/frc/robot/extras/NoteDetector.java +++ b/src/main/java/frc/robot/extras/NoteDetector.java @@ -15,7 +15,7 @@ public class NoteDetector { private static Pose2d notePos; private static BilinearInterpolator pixelLookupInterpolator; - public NoteDetector() { + private NoteDetector() { pixelLookupInterpolator = new BilinearInterpolator(VisionConstants.noteDetectionLookupTable); } diff --git a/src/main/java/frc/robot/extras/interpolators/BilinearInterpolator.java b/src/main/java/frc/robot/extras/interpolators/BilinearInterpolator.java index c21c370..be51cd6 100644 --- a/src/main/java/frc/robot/extras/interpolators/BilinearInterpolator.java +++ b/src/main/java/frc/robot/extras/interpolators/BilinearInterpolator.java @@ -109,7 +109,6 @@ else if (inputYValue < lookupTable[i][1] && inputYValue > lookupTable[i + 7][1]) }; } } - // check for first row for only x interpolation for (int i = 0; i < 7; i++) { if (inputYValue == lookupTable[i][1]) { @@ -128,7 +127,6 @@ else if (inputYValue < lookupTable[i][1] && inputYValue > lookupTable[i + 7][1]) } } } - // check for last row just to check for x only interpolation or point checking. (You can't do // y_interpolation or diagonal) for (int i = lookupTable.length - 7; i < lookupTable.length; i++) { diff --git a/src/main/java/frc/robot/extras/swerve/SwerveSetpointGenerator.java b/src/main/java/frc/robot/extras/swerve/SwerveSetpointGenerator.java index 86a4bac..41ddd5d 100644 --- a/src/main/java/frc/robot/extras/swerve/SwerveSetpointGenerator.java +++ b/src/main/java/frc/robot/extras/swerve/SwerveSetpointGenerator.java @@ -20,11 +20,7 @@ import java.util.Optional; /** - * Code modified again by FRC team 4829. hehehehhehehe - * - *
"Inspired" by FRC team 254. See the license file in the root directory of this project. - * - *
Takes a prior setpoint (ChassisSpeeds), a desired setpoint (from a driver, or from a path + * Takes a prior setpoint (ChassisSpeeds), a desired setpoint (from a driver, or from a path * follower), and outputs a new setpoint that respects all of the kinematic constraints on module * rotation speed and wheel velocity/acceleration. By generating a new setpoint every iteration, the * robot will converge to the desired setpoint quickly while avoiding any intermediate state that is @@ -160,28 +156,6 @@ protected double findDriveMaxS( return findRoot(func, x_0, y_0, f_0 - offset, x_1, y_1, f_1 - offset, max_iterations); } - // protected double findDriveMaxS( - // double x_0, double y_0, double x_1, double y_1, double max_vel_step) { - // // Our drive velocity between s=0 and s=1 is quadratic in s: - // // v^2 = ((x_1 - x_0) * s + x_0)^2 + ((y_1 - y_0) * s + y_0)^2 - // // = a * s^2 + b * s + c - // // Where: - // // a = (x_1 - x_0)^2 + (y_1 - y_0)^2 - // // b = 2 * x_0 * (x_1 - x_0) + 2 * y_0 * (y_1 - y_0) - // // c = x_0^2 + y_0^2 - // // We want to find where this quadratic results in a velocity that is > max_vel_step from our - // // velocity at s=0: - // // sqrt(x_0^2 + y_0^2) +/- max_vel_step = ...quadratic... - // final double dx = x_1 - x_0; - // final double dy = y_1 - y_0; - // final double a = dx * dx + dy * dy; - // final double b = 2.0 * x_0 * dx + 2.0 * y_0 * dy; - // final double c = x_0 * x_0 + y_0 * y_0; - // final double v_limit_upper_2 = Math.pow(Math.hypot(x_0, y_0) + max_vel_step, 2.0); - // final double v_limit_lower_2 = Math.pow(Math.hypot(x_0, y_0) - max_vel_step, 2.0); - // return 0.0; - // } - /** * Generate a new setpoint. *