Class VisionUtils

java.lang.Object
frc.robot.utils.VisionUtils

public class VisionUtils extends Object
  • Field Details

    • noteLimelight

      public static edu.wpi.first.networktables.NetworkTable noteLimelight
    • height

      public static double height
    • forward

      public static double forward
  • Constructor Details

    • VisionUtils

      public VisionUtils()
  • Method Details

    • visionEnabled

      public static void visionEnabled(boolean b)
      Toggle if vision is enable or not
      Parameters:
      b - Set if vision is enabled or not
    • getBotPoseFieldSpace

      public static edu.wpi.first.math.geometry.Pose3d getBotPoseFieldSpace()
      Gets the bots position relative to the field. Used by odometry
      Returns:
      The bots position
    • getBotPoseTargetSpace

      public static edu.wpi.first.math.geometry.Pose3d getBotPoseTargetSpace()
      Gets the bots position relative to the target. Used by AlignCommand
      Returns:
      The bots position
    • getDistanceFromTag

      public static double getDistanceFromTag()
      Gets the distance from the first visible AprilTag
      Returns:
      The distance (in meters) from the AprilTag
    • getLatencyPipeline

      public static double getLatencyPipeline()
      Gets the latency from the pipeline
      Returns:
      The latency
    • getLatencyCapture

      public static double getLatencyCapture()
      Gets the latency from capturing
      Returns:
      The latency
    • getNoteTX

      public static double getNoteTX()
    • getNoteTY

      public static double getNoteTY()
    • getNoteTV

      public static double getNoteTV()
    • YDistanceToNote

      public static double YDistanceToNote()
    • XDistanceToNote

      public static double XDistanceToNote()
    • distanceToNote

      public static double distanceToNote()