Class VisionConstants

java.lang.Object
frc.robot.services.vision.VisionConstants

public class VisionConstants extends Object
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.

  • Field Details

    • CAMERA_MAP

      public static final Map<Integer,VisionConstants.CameraConfig> CAMERA_MAP
      Map of Camera ID to its configuration. IDs should match those used in the native vision pipeline.
    • OFFLINE_TIMEOUT

      public static final Time OFFLINE_TIMEOUT
      Time in seconds before a camera is considered offline if no data is received.
    • SERVER_RPORT

      public static final int SERVER_RPORT
      Port for communication between Java and the native vision server.
      See Also:
    • SERVER_BPORT

      public static final int SERVER_BPORT
      Port for the native vision server to broadcast heading information.
      See Also:
    • NO_STD_DEVS

      public static final Matrix<N3,N1> NO_STD_DEVS
      Standard deviations for vision measurements when the data is not valid or should be ignored.
    • SINGLE_TAG_STD_DEVS

      public static final Matrix<N3,N1> SINGLE_TAG_STD_DEVS
      Standard deviations for vision measurements when only one AprilTag is visible.
    • MULTI_TAG_STD_DEVS

      public static final Matrix<N3,N1> MULTI_TAG_STD_DEVS
      Standard deviations for vision measurements when multiple AprilTags are visible (higher confidence).
    • TAG_STD_DEVS

      public static final Matrix<N3,N1> TAG_STD_DEVS
      Standard deviations for vision measurements used for individual tag tracking.
    • AMBIGUITY_CUTOFF

      public static final double AMBIGUITY_CUTOFF
      The maximum allowed ambiguity for a single-tag detection to be considered valid.
      See Also:
    • SINGLE_TAG_POSE_CUTOFF

      public static final Distance 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_AMBIGUITY
      Sentinel value indicating that no ambiguity calculation is applicable (e.g., multi-tag).
      See Also:
    • FIELD_LAYOUT

      public static final AprilTagFieldLayout FIELD_LAYOUT
      The AprilTag field layout representing the positions of tags on the current year's field.
    • BROADCAST_HEADING

      public static final boolean BROADCAST_HEADING
      Whether or not to broadcast heading information.
      See Also:
  • Constructor Details

    • VisionConstants

      public VisionConstants()