Package frc.robot.constants
Class FieldConstants
java.lang.Object
frc.robot.constants.FieldConstants
Field-level constants for the 2026 REBUILT game.
All dimensions are sourced from the maple-sim Arena2026Rebuilt field geometry and the
official FRC Game Manual to ensure simulation-to-reality parity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final edu.wpi.first.math.geometry.Translation3dBlue hub 3D target for shooter math (top opening, meters).static final edu.wpi.first.math.geometry.Translation2dBlue alliance hub center position (meters).static final edu.wpi.first.math.geometry.Pose2dstatic final edu.wpi.first.math.geometry.Pose2dstatic final doubleStandard FRC field length (meters).static final doubleStandard FRC field width (meters).static final doubleMass of a single Rebuilt Fuel ball (kg).static final doubleRadius of a single Rebuilt Fuel ball (meters).static final doubleHeight above the field surface at which game pieces rest in 3D visualization (meters).static final doubleApproximate side length of the hub structures (meters).static final doubleIntake collection radius (meters) for swallowing pieces in simulation.static final booleanControls whether the maple-sim arena runs in efficiency mode.static final edu.wpi.first.math.geometry.Translation3dRed hub 3D target for shooter math (top opening, meters).static final edu.wpi.first.math.geometry.Translation2dRed alliance hub center position (meters).static final edu.wpi.first.math.geometry.Pose2dstatic final edu.wpi.first.math.geometry.Pose2dstatic final doubleCoulomb friction coefficient for field boundary walls and obstacles.static final doubleCoefficient of restitution (bounciness) for field boundary walls and obstacles.static final doubleThickness of simulated field boundary walls (meters). -
Method Summary
Modifier and TypeMethodDescriptionstatic edu.wpi.first.math.geometry.Pose2dgetClosestClimbingPosition(edu.wpi.first.math.geometry.Pose2d currentRobotPose) Returns the closest climbing position to the robot based on current alliance.
-
Field Details
-
FIELD_LENGTH_METERS
public static final double FIELD_LENGTH_METERSStandard FRC field length (meters). Matches maple-sim Arena2026Rebuilt.- See Also:
-
FIELD_WIDTH_METERS
public static final double FIELD_WIDTH_METERSStandard FRC field width (meters). Matches maple-sim Arena2026Rebuilt.- See Also:
-
WALL_THICKNESS_METERS
public static final double WALL_THICKNESS_METERSThickness of simulated field boundary walls (meters).- See Also:
-
GAME_PIECE_RADIUS_METERS
public static final double GAME_PIECE_RADIUS_METERSRadius of a single Rebuilt Fuel ball (meters). 15 cm diameter = 7.5 cm radius. Source: RebuiltFuelOnField.REBUILT_FUEL_INFO- See Also:
-
GAME_PIECE_REST_HEIGHT_METERS
public static final double GAME_PIECE_REST_HEIGHT_METERSHeight above the field surface at which game pieces rest in 3D visualization (meters).- See Also:
-
GAME_PIECE_MASS_KG
public static final double GAME_PIECE_MASS_KGMass of a single Rebuilt Fuel ball (kg). 0.5 lbs = 0.2268 kg. Source: RebuiltFuelOnField.REBUILT_FUEL_INFO- See Also:
-
WALL_FRICTION
public static final double WALL_FRICTIONCoulomb friction coefficient for field boundary walls and obstacles.- See Also:
-
WALL_RESTITUTION
public static final double WALL_RESTITUTIONCoefficient of restitution (bounciness) for field boundary walls and obstacles.- See Also:
-
HUB_SIZE_METERS
public static final double HUB_SIZE_METERSApproximate side length of the hub structures (meters).- See Also:
-
BLUE_HUB_POS
public static final edu.wpi.first.math.geometry.Translation2d BLUE_HUB_POSBlue alliance hub center position (meters). -
RED_HUB_POS
public static final edu.wpi.first.math.geometry.Translation2d RED_HUB_POSRed alliance hub center position (meters). -
BLUE_HUB_3D
public static final edu.wpi.first.math.geometry.Translation3d BLUE_HUB_3DBlue hub 3D target for shooter math (top opening, meters). -
RED_HUB_3D
public static final edu.wpi.first.math.geometry.Translation3d RED_HUB_3DRed hub 3D target for shooter math (top opening, meters). -
INTAKE_COLLECTION_RADIUS_METERS
public static final double INTAKE_COLLECTION_RADIUS_METERSIntake collection radius (meters) for swallowing pieces in simulation.- See Also:
-
BLUE_NEARDEPOT_CLIMB_POSE
public static final edu.wpi.first.math.geometry.Pose2d BLUE_NEARDEPOT_CLIMB_POSE -
BLUE_OUTPOST_CLIMB_POSE
public static final edu.wpi.first.math.geometry.Pose2d BLUE_OUTPOST_CLIMB_POSE -
RED_NEARDEPOT_CLIMB_POSE
public static final edu.wpi.first.math.geometry.Pose2d RED_NEARDEPOT_CLIMB_POSE -
RED_NEAROUTPOST_CLIMB_POSE
public static final edu.wpi.first.math.geometry.Pose2d RED_NEAROUTPOST_CLIMB_POSE -
MAPLE_SIM_EFFICIENCY_MODE
public static final boolean MAPLE_SIM_EFFICIENCY_MODEControls whether the maple-sim arena runs in efficiency mode.OFF (false): Full realism — all game pieces spawned, both depots, all center field pieces. Recommended for match-accurate simulation and autonomous testing.
ON (true): Reduced piece count — only 1/3 of center pieces and only your alliance's depot. Useful for faster iteration during mechanism development when full field population is unnecessary.
- See Also:
-
-
Method Details
-
getClosestClimbingPosition
public static edu.wpi.first.math.geometry.Pose2d getClosestClimbingPosition(edu.wpi.first.math.geometry.Pose2d currentRobotPose) Returns the closest climbing position to the robot based on current alliance.- Parameters:
currentRobotPose- The robot's current field-relative pose.- Returns:
- The nearest climb approach pose.
-