Package frc.robot

Class FieldConstants

java.lang.Object
frc.robot.FieldConstants

public class FieldConstants extends Object
Field geometry and reference points for path planning, vision, and alignment.

Coordinate system:

  • All constants are expressed in the WPILib field coordinate system.
  • Values are defined from the perspective of the BLUE alliance wall.

Source of truth:

  • Field Details

    • fieldType

      public static final FieldConstants.FieldType fieldType
      Which physical field variant the geometry files correspond to.

      This value affects which deploy subfolder is used when loading AprilTag layouts.

    • aprilTagCount

      public static final int aprilTagCount
      Number of AprilTags in the currently selected official layout.

      This is computed from FieldConstants.AprilTagLayoutType.OFFICIAL.

    • aprilTagWidth

      public static final double aprilTagWidth
      Physical width of an AprilTag (edge length) in meters.
    • defaultAprilTagType

      public static final FieldConstants.AprilTagLayoutType defaultAprilTagType
      Default AprilTag layout to use for most robot code.

      Other layouts (such as FieldConstants.AprilTagLayoutType.NONE) can exist for simulation/testing.

    • fieldLength

      public static final double fieldLength
      Field length in meters as defined by the official AprilTag layout.
    • fieldWidth

      public static final double fieldWidth
      Field width in meters as defined by the official AprilTag layout.
  • Constructor Details

    • FieldConstants

      public FieldConstants()