Class LimelightData

java.lang.Object
limelight.networktables.LimelightData

public class LimelightData extends Object
Data retrieval class for Limelight
  • Field Details

    • targetData

      public LimelightTargetData targetData
      Target data from limelight.
    • pipelineData

      public LimelightPipelineData pipelineData
      Pipeline data from limelight.
    • limelightTable

      protected NetworkTable limelightTable
    • results

      protected NetworkTableEntry results
      The limelight.results LimelightResults JSON data
    • rawfiducials

      protected NetworkTableEntry rawfiducials
      Raw AprilTag detection from NetworkTables.
    • rawDetections

      protected NetworkTableEntry rawDetections
      Raw Neural Detector limelight.results from NetworkTables.
    • classifierClass

      protected NetworkTableEntry classifierClass
      Neural Clasifier result class name.
    • detectorClass

      protected NetworkTableEntry detectorClass
      Primary neural detect result class name.
    • camera2RobotPose3d

      protected DoubleArrayEntry camera2RobotPose3d
      Pose3d object representing the camera's position and orientation relative to the robot.
    • barcodeData

      protected StringArrayEntry barcodeData
      Barcodes read by the Limelight.
    • pythonScriptDataSet

      protected DoubleArrayEntry pythonScriptDataSet
      Custom Python script set data for Limelight.
    • pythonScriptData

      protected DoubleArrayEntry pythonScriptData
      Custom Python script output data for Limelight.
    • resultsObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper resultsObjectMapper
      Object mapper for limelight.results JSON.
  • Constructor Details

    • LimelightData

      public LimelightData(Limelight camera)
      Construct the LimelightData class to retrieve read-only data.
      Parameters:
      camera - Limelight to use.
  • Method Details

    • getPythonData

      public double[] getPythonData()
      Get the output of the custom python script running on the Limelight.
      Returns:
      Output Double Array of the custom python script running on the Limelight.
    • setPythonData

      public void setPythonData(double[] outgoingData)
      Set the input for the custom python script running on the Limelight
      Parameters:
      outgoingData - Double array for custom python script.
    • getBarcodeData

      public String[] getBarcodeData()
      Barcode data read by the Limelight.
      Returns:
      Barcode data as a string.
    • getCamera2Robot

      public Pose3d getCamera2Robot()
      Gets the camera's 3D pose with respect to the robot's coordinate system.
      Returns:
      Pose3d object representing the camera's position and orientation relative to the robot
    • getClassifierClass

      public String getClassifierClass()
      Gets the current neural classifier result class name.
      Returns:
      Class name string from classifier pipeline
    • getDetectorClass

      public String getDetectorClass()
      Gets the primary neural detector result class name.
      Returns:
      Class name string from detector pipeline
    • getResults

      public Optional<LimelightResults> getResults()
      Get LimelightResults from NetworkTables.

      Exists only if LL GUI option "Output & Crosshair - Send JSON over NT?" is Yes

      Returns:
      LimelightResults if it exists.
    • getRawFiducials

      public RawFiducial[] getRawFiducials()
      Gets the latest raw fiducial/AprilTag detection limelight.results from NetworkTables.
      Returns:
      Array of RawFiducial objects containing detection details
    • getRawDetections

      public RawDetection[] getRawDetections()
      Gets the latest raw neural detector limelight.results from NetworkTables
      Returns:
      Array of RawDetection objects containing detection details