Package frc.robot.services.vision
Class VisionConstants
java.lang.Object
frc.robot.services.vision.VisionConstants
Hardware and tuning constants for the vision service.
Contains configurations for cameras, including their positions relative to the robot, field-of-view limits, and maximum detection ranges.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDefines the physical and operational parameters of a camera. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe maximum allowed ambiguity for a single-tag detection to be considered valid.static final booleanWhether or not to broadcast heading information.static final Map<Integer,VisionConstants.CameraConfig> Map of Camera ID to its configuration.static final AprilTagFieldLayoutThe AprilTag field layout representing the positions of tags on the current year's field.Standard deviations for vision measurements when multiple AprilTags are visible (higher confidence).static final intSentinel value indicating that no ambiguity calculation is applicable (e.g., multi-tag).Standard deviations for vision measurements when the data is not valid or should be ignored.static final TimeTime in seconds before a camera is considered offline if no data is received.static final intPort for the native vision server to broadcast heading information.static final intPort for communication between Java and the native vision server.static final DistanceThe maximum distance from the camera to a tag for a single-tag detection to be trusted.Standard deviations for vision measurements when only one AprilTag is visible.Standard deviations for vision measurements used for individual tag tracking. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CAMERA_MAP
Map of Camera ID to its configuration. IDs should match those used in the native vision pipeline. -
OFFLINE_TIMEOUT
Time in seconds before a camera is considered offline if no data is received. -
SERVER_RPORT
public static final int SERVER_RPORTPort for communication between Java and the native vision server.- See Also:
-
SERVER_BPORT
public static final int SERVER_BPORTPort for the native vision server to broadcast heading information.- See Also:
-
NO_STD_DEVS
Standard deviations for vision measurements when the data is not valid or should be ignored. -
SINGLE_TAG_STD_DEVS
Standard deviations for vision measurements when only one AprilTag is visible. -
MULTI_TAG_STD_DEVS
Standard deviations for vision measurements when multiple AprilTags are visible (higher confidence). -
TAG_STD_DEVS
Standard deviations for vision measurements used for individual tag tracking. -
AMBIGUITY_CUTOFF
public static final double AMBIGUITY_CUTOFFThe maximum allowed ambiguity for a single-tag detection to be considered valid.- See Also:
-
SINGLE_TAG_POSE_CUTOFF
The maximum distance from the camera to a tag for a single-tag detection to be trusted. -
NO_AMBIGUITY
public static final int NO_AMBIGUITYSentinel value indicating that no ambiguity calculation is applicable (e.g., multi-tag).- See Also:
-
FIELD_LAYOUT
The AprilTag field layout representing the positions of tags on the current year's field. -
BROADCAST_HEADING
public static final boolean BROADCAST_HEADINGWhether or not to broadcast heading information.- See Also:
-
-
Constructor Details
-
VisionConstants
public VisionConstants()
-