Class VisionConfig

java.lang.Object
org.hivevisionftc.vision.VisionConfig

public final class VisionConfig extends Object
Camera mounting geometry and detection thresholds. Every setter returns this, so calls can be chained.

Distances are inches and angles are degrees. The robot frame has +X forward and +Y to the left. See the calibration guide for how to measure each value.

  • Constructor Details

    • VisionConfig

      public VisionConfig()
  • Method Details

    • cameraPitchDeg

      public VisionConfig cameraPitchDeg(double cameraPitchDeg)
      Pitch of the camera above the horizontal, in degrees. Negative if the camera looks down.
    • cameraHeightIn

      public VisionConfig cameraHeightIn(double cameraHeightIn)
      Height of the camera lens above the floor.
    • cameraForwardIn

      public VisionConfig cameraForwardIn(double cameraForwardIn)
      How far the camera lens sits ahead of the robot center. Negative if it is behind.
    • cameraLeftIn

      public VisionConfig cameraLeftIn(double cameraLeftIn)
      How far the camera lens sits to the left of the robot center. Negative if it is to the right.
    • targetHeightIn

      public VisionConfig targetHeightIn(double targetHeightIn)
      Height of the center of the game element above the floor. The camera must be above this.
    • maxStalenessMs

      public VisionConfig maxStalenessMs(long maxStalenessMs)
      Detections older than this are discarded.
    • minConfidence

      public VisionConfig minConfidence(double minConfidence)
      Detections below this confidence (0 to 1) are discarded.

      The Limelight also applies its own threshold in the web UI. If that one is higher, the camera never reports the detection and this value cannot bring it back.

    • limelightPipeline

      public VisionConfig limelightPipeline(int limelightPipeline)
      Limelight pipeline index to run.
    • limelightPollingRateHz

      public VisionConfig limelightPollingRateHz(int limelightPollingRateHz)
      How often, from 1 to 250 Hz, the control hub asks the Limelight for new data.
    • getCameraPitchDeg

      public double getCameraPitchDeg()
    • getCameraHeightIn

      public double getCameraHeightIn()
    • getCameraForwardIn

      public double getCameraForwardIn()
    • getCameraLeftIn

      public double getCameraLeftIn()
    • getTargetHeightIn

      public double getTargetHeightIn()
    • getMaxStalenessMs

      public long getMaxStalenessMs()
    • getMinConfidence

      public double getMinConfidence()
    • getLimelightPipeline

      public int getLimelightPipeline()
    • getLimelightPollingRateHz

      public int getLimelightPollingRateHz()