]> git.taranathan.com Git - FRC2026.git/commitdiff
no big ladder
authoriefomit <timofei.stem@gmail.com>
Mon, 13 Apr 2026 20:57:54 +0000 (13:57 -0700)
committeriefomit <timofei.stem@gmail.com>
Mon, 13 Apr 2026 20:57:54 +0000 (13:57 -0700)
just small ladder

src/main/java/frc/robot/commands/gpm/Superstructure.java
src/main/java/frc/robot/constants/FieldConstants.java
src/main/java/frc/robot/util/PhaseManager.java

index 1fe654d47b0fb0d5610aefc7bf117601c29517a5..ad7fc07383e91e01f81eb0cf6c683a1835a39168 100644 (file)
@@ -14,7 +14,6 @@ import edu.wpi.first.math.kinematics.ChassisSpeeds;
 import edu.wpi.first.math.util.Units;
 import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
 import edu.wpi.first.wpilibj2.command.Command;
-import edu.wpi.first.wpilibj2.command.InstantCommand;
 import frc.robot.constants.Constants;
 import frc.robot.constants.FieldConstants;
 import frc.robot.constants.ShotInterpolation;
index 12a590080b2fa64a742f00d48d012c69a725cc19..d0339b17fa6a4f13a05a57238e5208976350eeeb 100644 (file)
@@ -57,24 +57,13 @@ public class FieldConstants {
 
   public static final Translation3d NEUTRAL_RIGHT = new Translation3d(FIELD_LENGTH / 2, RIGHT_SIDE_TARGET, 0);
 
-  public static final Translation3d ALLIANCE_LEFT_BLUE = new Translation3d(BLUE_BORDER - 3.2, LEFT_SIDE_TARGET, 0); // previous
-                                                                                                                    // hub
-                                                                                                                    // +
-                                                                                                                    // a
-                                                                                                                    // few
-                                                                                                                    // feet
-                                                                                                                    // further
-                                                                                                                    // back
+  // previous hub + a few feet further back
+  public static final Translation3d ALLIANCE_LEFT_BLUE = new Translation3d(BLUE_BORDER - 3.2, LEFT_SIDE_TARGET, 0);
 
   public static final Translation3d ALLIANCE_RIGHT_BLUE = new Translation3d(BLUE_BORDER - 2.2, RIGHT_SIDE_TARGET, 0);
+  // previous hub + a few feet further back
 
-  public static final Translation3d ALLIANCE_LEFT_RED = new Translation3d(RED_BORDER + 2.2, LEFT_SIDE_TARGET, 0); // previous
-                                                                                                                  // hub
-                                                                                                                  // + a
-                                                                                                                  // few
-                                                                                                                  // feet
-                                                                                                                  // further
-                                                                                                                  // back
+  public static final Translation3d ALLIANCE_LEFT_RED = new Translation3d(RED_BORDER + 2.2, LEFT_SIDE_TARGET, 0);
 
   public static final Translation3d ALLIANCE_RIGHT_RED = new Translation3d(RED_BORDER + 3.2, RIGHT_SIDE_TARGET, 0);
 
@@ -197,17 +186,6 @@ public class FieldConstants {
       return FieldZone.UNDER_LADDER;
     }
 
-    if ((y > -3.437731 && y < FieldConstants.FIELD_WIDTH - 3.437731)
-        && (x > (FieldConstants.BLUE_ALLIANCE_LINE + (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS) / 2)
-            && (x < RED_ALLIANCE_LINE - (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS / 2)))) {
-      if (Robot.getAlliance() == Alliance.Red && y > FieldConstants.FIELD_LENGTH / 2) {
-        return FieldZone.UNDER_LADDER;
-      }        
-      if (Robot.getAlliance() == Alliance.Blue && y < FieldConstants.FIELD_LENGTH / 2) {
-        return FieldZone.UNDER_LADDER;
-      }        
-    }
-
     if (x > FieldConstants.RED_ALLIANCE_LINE - (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS) / 2) {
       return (Robot.getAlliance() == Alliance.Red) ? FieldZone.ALLIANCE : FieldZone.OPPOSITION;
     } else if (x < FieldConstants.BLUE_ALLIANCE_LINE + (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS) / 2) {
index 1f985fc5d71bf332242a8a8227b6afa0313ae299..10fb76a6e7d38e9972d17a4e434de187cb9432ad 100644 (file)
@@ -61,13 +61,13 @@ public class PhaseManager {
 
     private void updateWantedState(Pose2d drivePose) {
         FieldZone zone = FieldConstants.getZone(drivePose.getTranslation());
-        // if (zone == FieldConstants.FieldZone.UNDER_LADDER) {
-        //     wantedState = WantedState.IDLE;
-        // } else if (zone == FieldConstants.FieldZone.ALLIANCE) {
-        //     wantedState = WantedState.SHOOTING;
-        // } else {
-        //     wantedState = WantedState.PASSING;
-        // }
+        if (zone == FieldConstants.FieldZone.UNDER_LADDER) {
+            wantedState = WantedState.IDLE;
+        } else if (zone == FieldConstants.FieldZone.ALLIANCE) {
+            wantedState = WantedState.SHOOTING;
+        } else {
+            wantedState = WantedState.PASSING;
+        }
         if (zone == FieldConstants.FieldZone.ALLIANCE) {
             wantedState = WantedState.SHOOTING;
         } else {