Interface Vision

All Known Implementing Classes:
LimelightVision, PhotonVision

public interface Vision
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changePipeline(int index)
    Change the current pipeline.
    double
    getDistanceToTarget(double mountAngle, double mountHeight, double goalHeight, boolean topY)
    Get the Distance to target via trigonometry.
    double
    Sometimes, you may want to find the maximum Y for corners for the intake to suck in the top of a cone, or cube.
    List<?>
    Get all targets.
  • Method Details

    • getTargets

      List<?> getTargets()
      Get all targets.
      Returns:
      All targets in view.
    • changePipeline

      void changePipeline(int index)
      Change the current pipeline.
      Parameters:
      index - Pipeline index, depends on your configuration.
    • getDistanceToTarget

      double getDistanceToTarget(double mountAngle, double mountHeight, double goalHeight, boolean topY)
      Get the Distance to target via trigonometry.
      Parameters:
      mountAngle - The amount of degrees back the limelight is.
      mountHeight - Height in inches from center of limelight lens to floor.
      goalHeight - Distance in inches from floor to center of target.
      topY - Get the top most location from the camera. See this method.
      Returns:
      Distance to target, returns -1 on fail.
    • getMaxPointY

      double getMaxPointY()
      Sometimes, you may want to find the maximum Y for corners for the intake to suck in the top of a cone, or cube. This function is helpful for that.
      Returns:
      The maximum Y point for all corners, or -1 if none is found