Package frc.robot
Class FieldConstants
java.lang.Object
frc.robot.FieldConstants
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 size and AprilTag poses are loaded from an
AprilTagFieldLayoutJSON.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAvailable AprilTag layouts for this project.static classDepot geometry and reference points on the alliance side.static enumIdentifies which set of field-measurement JSONs to load.static classHub geometry and reference points (center, corners, and faces).static classGeometry for the left bump and common reference points.static classLeft trench geometry and key opening reference points.static classConvenient Y positions for important horizontal (field-widthwise) lines.static classConvenient X positions for important vertical (field-lengthwise) lines.static classOutpost geometry and reference points on the alliance side.static classGeometry and reference points on the alliance side for the autoPass command.static classDefines commonly used rectangular field regions.static classGeometry for the right bump and common reference points.static classRight trench geometry and key opening reference points.static classTower geometry and reference points (center and uprights). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNumber of AprilTags in the currently selected official layout.static final doublePhysical width of an AprilTag (edge length) in meters.static final FieldConstants.AprilTagLayoutTypeDefault AprilTag layout to use for most robot code.static final doubleField length in meters as defined by the official AprilTag layout.static final FieldConstants.FieldTypeWhich physical field variant the geometry files correspond to.static final doubleField width in meters as defined by the official AprilTag layout. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
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 aprilTagCountNumber of AprilTags in the currently selected official layout.This is computed from
FieldConstants.AprilTagLayoutType.OFFICIAL. -
aprilTagWidth
public static final double aprilTagWidthPhysical width of an AprilTag (edge length) in meters. -
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 fieldLengthField length in meters as defined by the official AprilTag layout. -
fieldWidth
public static final double fieldWidthField width in meters as defined by the official AprilTag layout.
-
-
Constructor Details
-
FieldConstants
public FieldConstants()
-