]> git.taranathan.com Git - FRC2026.git/commitdiff
Update FieldConstants.java
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 21 Feb 2026 23:02:25 +0000 (15:02 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 21 Feb 2026 23:02:25 +0000 (15:02 -0800)
src/main/java/frc/robot/constants/FieldConstants.java

index 52ef28816dc49124540363bc8077e8411e64a1e6..037920c0c1cde397c3bfd29ee287ef87ea5487b0 100644 (file)
@@ -11,21 +11,22 @@ import edu.wpi.first.wpilibj.DriverStation.Alliance;
 import frc.robot.Robot;
 
 public class FieldConstants {
-  /** Width of the field [meters] */
-  public static final double FIELD_LENGTH = Units.inchesToMeters(57*12 + 6+7.0/8.0);
-  /** Height of the field [meters] */
-  public static final double FIELD_WIDTH = Units.inchesToMeters(26*12 + 5);
 
   /**Apriltag layout for 2026 REBUILT */
   public static final AprilTagFieldLayout field = AprilTagFieldLayout.loadField(AprilTagFields.k2026RebuiltWelded);
 
+  /** Width of the field [meters] */
+  public static final double FIELD_LENGTH = field.getFieldLength();
+  /** Height of the field [meters] */
+  public static final double FIELD_WIDTH = field.getFieldWidth();
+
   public static final double RED_BORDER = Units.inchesToMeters(180);
   public static final double BLUE_BORDER = FIELD_LENGTH - Units.inchesToMeters(180);
   public static final double LEFT_SIDE_TARGET = FIELD_WIDTH * 0.25;
   public static final double RIGHT_SIDE_TARGET = FIELD_WIDTH * 0.75;
-  // TODO: Find this
+
   /**The coordinate of the climb position */
-  public static final Pose2d BLUE_CLIMB_LOCATION = new Pose2d(0, 0, new Rotation2d());
+  public static final Pose2d BLUE_CLIMB_LOCATION = new Pose2d(1.5, FIELD_WIDTH/2 - 2.0, new Rotation2d());
   public static final Pose2d RED_CLIMB_LOCATION = new Pose2d(0, 0, new Rotation2d());
 
   public static final Pose2d getClimbLocation(){