Class VisionTarget


  • public class VisionTarget
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      VisionTarget​(double x, double y)
      VisionTarget to store positioning data about a point generated by a computer vision system
      VisionTarget​(double x, double y, double area)
      VisionTarget to store positioning data about a point generated by a computer vision system
      VisionTarget​(java.awt.Point point)
      VisionTarget to store positioning data about a point generated by a computer vision system
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists()  
      double getArea()  
      double getDistance()
      Get the distance from the camera to the target in meters
      FieldPosition getPosition​(FieldPosition robot_position)
      Get the target's field-relative position (does not account for angle)
      double getX()  
      double getY()  
      void setArea​(double area)  
      void setExists​(boolean exists)  
      void setX​(double x)  
      void setY​(double y)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VisionTarget

        public VisionTarget​(java.awt.Point point)
        VisionTarget to store positioning data about a point generated by a computer vision system
        Parameters:
        point - Point containing X, and Y positions
      • VisionTarget

        public VisionTarget​(double x,
                            double y)
        VisionTarget to store positioning data about a point generated by a computer vision system
        Parameters:
        x - X position on video feed
        y - Y position on video feed
      • VisionTarget

        public VisionTarget​(double x,
                            double y,
                            double area)
        VisionTarget to store positioning data about a point generated by a computer vision system
        Parameters:
        x - X position on video feed
        y - Y position on video feed
        area - Area of target
    • Method Detail

      • getDistance

        public double getDistance()
        Get the distance from the camera to the target in meters
        Returns:
        Distance in meters
      • getPosition

        public FieldPosition getPosition​(FieldPosition robot_position)
        Get the target's field-relative position (does not account for angle)
        Parameters:
        robot_position - Field-relative position of robot
        Returns:
        Field-relative position of target
      • exists

        public boolean exists()
      • setExists

        public void setExists​(boolean exists)
      • getY

        public double getY()
      • setY

        public void setY​(double y)
      • getArea

        public double getArea()
      • setArea

        public void setArea​(double area)
      • getX

        public double getX()
      • setX

        public void setX​(double x)