Class FieldTargetConfig
All positions are defined from the Blue alliance perspective in meters. Red alliance coordinates are computed at runtime by mirroring the X-axis. Embed this config in the turret subsystem config so positions are loaded from the deploy JSON. Divider coordinates are derived from AprilTag positions on the field structure: AprilTag 26 marks the field center and AprilTag 23 marks the neutral zone boundary.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleX-coordinate boundary that separates the alliance zone from the neutral zone in meters.doubleY-coordinate of the field center divider in meters.doubleTotal field length along the X-axis in meters.doubleTotal field width along the Y-axis in meters.doubleX-coordinate of the Alliance Hub target in meters (Blue alliance perspective).doubleY-coordinate of the Alliance Hub target in meters, aligned with the field center divider.doubleX-coordinate of the left zone rally point in meters (Blue alliance perspective).doubleY-coordinate of the left zone rally point in meters.doubleX-coordinate of the right zone rally point in meters (Blue alliance perspective).doubleY-coordinate of the right zone rally point in meters. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
fieldLengthMeters
public double fieldLengthMetersTotal field length along the X-axis in meters. -
fieldWidthMeters
public double fieldWidthMetersTotal field width along the Y-axis in meters. -
allianceZoneBoundaryXMeters
public double allianceZoneBoundaryXMetersX-coordinate boundary that separates the alliance zone from the neutral zone in meters.When the robot's X position is less than this value (Blue alliance), the robot is considered in the alliance zone. For Red alliance, the boundary is mirrored to fieldLength minus this value. Derived from AprilTag 23's X position (4.574 m).
-
fieldCenterDividerYMeters
public double fieldCenterDividerYMetersY-coordinate of the field center divider in meters.This is the lateral midline of the field, derived from AprilTag 26's Y position (4.021 m). Use it for determining whether the robot is on the left or right side of the field.
-
hubPositionXMeters
public double hubPositionXMetersX-coordinate of the Alliance Hub target in meters (Blue alliance perspective).Derived from the midpoint between AprilTag 26 (x=4.008 m) and AprilTag 20 (x=5.215 m), which sit on opposite sides of the hub.
-
hubPositionYMeters
public double hubPositionYMetersY-coordinate of the Alliance Hub target in meters, aligned with the field center divider. -
leftZonePositionXMeters
public double leftZonePositionXMetersX-coordinate of the left zone rally point in meters (Blue alliance perspective). -
leftZonePositionYMeters
public double leftZonePositionYMetersY-coordinate of the left zone rally point in meters. -
rightZonePositionXMeters
public double rightZonePositionXMetersX-coordinate of the right zone rally point in meters (Blue alliance perspective). -
rightZonePositionYMeters
public double rightZonePositionYMetersY-coordinate of the right zone rally point in meters.
-
-
Constructor Details
-
FieldTargetConfig
public FieldTargetConfig()
-