]> git.taranathan.com Git - FRC2026.git/commitdiff
more clean up
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Wed, 18 Feb 2026 19:32:41 +0000 (11:32 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Wed, 18 Feb 2026 19:32:41 +0000 (11:32 -0800)
src/main/java/frc/robot/constants/FieldConstants.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/subsystems/hood/Hood.java
src/main/java/frc/robot/subsystems/hood/HoodConstants.java

index 33cdcff83e515b3640e62f6e402236bc00d3d4b6..d31c8dcaa181b57de9cce40c4ce72d551f85e70c 100644 (file)
@@ -1,19 +1,13 @@
 package frc.robot.constants;
 
-import java.lang.reflect.Field;
-
-import org.opencv.dnn.Net;
-
 import edu.wpi.first.apriltag.AprilTagFieldLayout;
 import edu.wpi.first.apriltag.AprilTagFields;
 import edu.wpi.first.math.geometry.Translation2d;
 import edu.wpi.first.math.geometry.Translation3d;
 import edu.wpi.first.math.util.Units;
 import edu.wpi.first.wpilibj.DriverStation.Alliance;
-import edu.wpi.first.wpilibj2.command.InstantCommand;
 import frc.robot.Robot;
 import frc.robot.util.FieldZone;
-import frc.robot.util.ShootingTarget;
 
 public class FieldConstants {
   /** Width of the field [meters] */
@@ -92,7 +86,7 @@ public class FieldConstants {
 
   public static FieldZone getZone(Translation2d drivepose) {
     double x = drivepose.getX();
-    double y = drivepose.getY();
+    //double y = drivepose.getY();
     if(x < FieldConstants.RedAllianceLine) { // inside red
       if (Robot.getAlliance() == Alliance.Red) {
         return FieldZone.ALLIANCE;
index 2f47c82763f835a971fcb30bd710b14520aadfe6..75daa516f34fdf3263a41ce4e5cf9334dedf1147 100644 (file)
@@ -2,7 +2,6 @@ package frc.robot.controls;
 
 import java.util.function.BooleanSupplier;
 
-import edu.wpi.first.math.geometry.Pose2d;
 import edu.wpi.first.math.geometry.Rotation2d;
 import edu.wpi.first.wpilibj.DriverStation.Alliance;
 import edu.wpi.first.wpilibj2.command.Command;
@@ -14,7 +13,6 @@ import frc.robot.commands.gpm.AutoShootCommand;
 import frc.robot.constants.Constants;
 import frc.robot.subsystems.drivetrain.Drivetrain;
 import frc.robot.subsystems.shooter.Shooter;
-import frc.robot.subsystems.shooter.ShooterConstants;
 import frc.robot.subsystems.spindexer.Spindexer;
 import frc.robot.subsystems.turret.Turret;
 import frc.robot.subsystems.hood.Hood;
@@ -35,8 +33,6 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
     private Intake intake;
     private Spindexer spindexer;
 
-    private Pose2d alignmentPose = null;
-    private Command turretAutoShoot;
     private Command autoShoot;
 
     private boolean intakeBoolean = true;
index 82ef495cc90e6e283b42a0ec949ac950fd48c171..89ac487df476e6027544f98ed11f155b68e2e411 100644 (file)
@@ -24,13 +24,12 @@ public class Hood extends SubsystemBase implements HoodIO{
     private double MIN_ANGLE_RAD = Units.degreesToRadians(HoodConstants.MIN_ANGLE);
        private double MAX_ANGLE_RAD = Units.degreesToRadians(HoodConstants.MAX_ANGLE);
 
-       private double MAX_VEL_RAD_PER_SEC = 25;
-       private double MAX_ACCEL_RAD_PER_SEC2 = 160.0;
+       private double MAX_VEL_RAD_PER_SEC = HoodConstants.MAX_VELOCITY;
+       private double MAX_ACCEL_RAD_PER_SEC2 = HoodConstants.MAX_ACCELERATION;
 
     private double GEAR_RATIO = HoodConstants.HOOD_GEAR_RATIO;
 
-       private final LinearFilter setpointFilter = LinearFilter.singlePoleIIR(0.02
-       , 0.02);
+       private final LinearFilter setpointFilter = LinearFilter.singlePoleIIR(0.02, 0.02);
 
        private double FEEDFORWARD_KV = 0.12;
 
index 07928feb66cacdbd20639135ced70b438152d3ad..03343b0916562dd029093f77b902965763c1dd0f 100644 (file)
@@ -1,9 +1,5 @@
 package frc.robot.subsystems.hood;
 
-import edu.wpi.first.math.geometry.Rotation2d;
-import edu.wpi.first.math.geometry.Translation2d;
-import edu.wpi.first.math.util.Units;
-
 public class HoodConstants {
     public static final double HOOD_GEAR_RATIO = 64;
 
@@ -13,27 +9,9 @@ public class HoodConstants {
 
     public static final double CENTER_OF_MASS_LENGTH = 0.138; // meters
 
-    // public static final double MAX_VELOCITY = 5; // rad/s
-    public static final double MAX_VELOCITY = 0.30; // rad/s
-    public static final double MAX_ACCELERATION = 30; // rad/s^2
+    public static final double MAX_VELOCITY = 25; // rad/s
+    public static final double MAX_ACCELERATION = 160; // rad/s^2
 
     public static final double MAX_ANGLE = 82; // degrees
     public static final double MIN_ANGLE = 58.5; // degrees 
-
-    public static final double START_ANGLE = 90-22.9; // degrees
-
-    // Arena dimensions
-    public static final double TARGET_HEIGHT = 2.44; // meters
-    public static final double SHOOTER_HEIGHT = 0.51; // meters
-
-    public static final Translation2d TRANSLATION_TARGET = new Translation2d(0, 0);
-    public static final Rotation2d ROTATION_TARGET_ANGLE = new Rotation2d();
-    // Other
-    public static final double INITIAL_VELOCTIY = 14.9; // meters per second
-
-    // Testing purposes
-    public static final double START_DISTANCE = 2; // meters
-
-    // Calibration Purposes
-    public static final double CURRENT_SPIKE_THRESHHOLD = 10.0; // amps
 }