Class LimelightResults

java.lang.Object
limelight.networktables.LimelightResults

public class LimelightResults extends Object
Limelight Results object, parsed from a Limelight's JSON limelight.results output.
  • Field Details

    • error

      public String error
      Error message, if any.
    • tx

      public double tx
      Horizontal Offset From Crosshair To Target (LL1: -27 degrees to 27 degrees / LL2: -29.8 to 29.8 degrees).
    • ty

      public double ty
      Vertical Offset From Crosshair To Target (LL1: -20.5 degrees to 20.5 degrees / LL2: -24.85 to 24.85 degrees).
    • txnc

      public double txnc
      Horizontal Offset From Principal Pixel To Target (degrees).
    • tync

      public double tync
      Vertical Offset From Principal Pixel To Target (degrees).
    • ta

      public double ta
      Undistorted, normalized area of target (0-100).
    • pipelineID

      public double pipelineID
      Current pipeline index
    • pipeline_type

      public String pipeline_type
      Current Pipeline Type e.g. "pipe_color".
    • latency_pipeline

      public double latency_pipeline
      Targeting latency (milliseconds consumed by tracking loop this frame)
    • latency_capture

      public double latency_capture
      Capture latency (milliseconds between the end of the exposure of the middle row to the beginning of the tracking loop)
    • timestamp_LIMELIGHT_publish

      public double timestamp_LIMELIGHT_publish
      Timestamp in milliseconds from boot (legacy).
    • timestamp_RIOFPGA_capture

      public double timestamp_RIOFPGA_capture
      Timestamp in milliseconds from RIO.
    • timestamp_NT

      public double timestamp_NT
      NetworkTables server time in microseconds (0 if not connected).
    • timestamp_System

      public double timestamp_System
      System wall clock timestamp in microseconds since epoch.
    • frame_index

      public double frame_index
      Frame index (counter starting at 0).
    • valid

      public boolean valid
      Validity indicator. 1 = valid targets, 0 = no valid targets
    • botpose

      public double[] botpose
      Botpose (MegaTag): x,y,z, roll, pitch, yaw (meters, degrees)
    • botpose_wpired

      public double[] botpose_wpired
      Botpose (MegaTag1, WPI Red driverstation): x,y,z, roll, pitch, yaw (meters, degrees)
    • botpose_wpiblue

      public double[] botpose_wpiblue
      Botpose (MegaTag1, WPI Blue driverstation): x,y,z, roll, pitch, yaw (meters, degrees)
    • botpose_mt2

      public double[] botpose_mt2
      Botpose (MegaTag2): x,y,z, roll, pitch, yaw (meters, degrees).
    • botpose_mt2_blue

      public double[] botpose_mt2_blue
      Botpose (MegaTag2, WPI Blue driverstation): x,y,z, roll, pitch, yaw (meters, degrees).
    • botpose_tagcount

      public double botpose_tagcount
      Number of tags used to compute botpose
    • botpose_span

      public double botpose_span
      Max distance between tags used to compute botpose (meters)
    • botpose_avgdist

      public double botpose_avgdist
      Max distance between tags used to compute botpose (meters)
    • botpose_avgarea

      public double botpose_avgarea
      Average area of tags used to compute botpose
    • camerapose_robotspace

      public double[] camerapose_robotspace
      Camera pose in robot space [x, y, z, roll, pitch, yaw] (meters, degrees).
    • targets_Retro

      public RetroreflectiveTape[] targets_Retro
      Color/Retroreflective pipeline results array
    • targets_Fiducials

      public AprilTagFiducial[] targets_Fiducials
      AprilTag pipeline results array
    • targets_Classifier

      public NeuralClassifier[] targets_Classifier
      Classifier pipeline results array
    • targets_Detector

      public NeuralDetector[] targets_Detector
      Neural Detector pipeline results array
    • targets_Barcode

      public Barcode[] targets_Barcode
      Barcode pipeline results array
    • hardware

      public HardwareReport hardware
      Hardware report
    • imuResults

      public IMUResults imuResults
      Limelight IMU results
    • rewindStats

      public RewindStats rewindStats
      Rewind stats (Limelight 4 only)
    • imageSource

      public String imageSource
      Image source setting value.
    • hardwareType

      public String hardwareType
      Hardware type identifier.
    • uiRefresh

      public int uiRefresh
      1 if web UI needs refresh, 0 otherwise.
    • ignoreNetworkTables

      public int ignoreNetworkTables
      1 if NetworkTables pipeline control is disabled, 0 otherwise.
    • targetDistance

      public double targetDistance
      3D distance from camera to target (or POI) in Meters
    • PythonOut

      public double[] PythonOut
      Output data from python SnapScript Pipelines (array of 8 doubles).
    • stdev_mt1

      public double[] stdev_mt1
      MT1 Standard Deviation [x, y, z, roll, pitch, yaw] (meters, degrees).
    • stdev_mt2

      public double[] stdev_mt2
      MT2 Standard Deviation [x, y, z, roll, pitch, yaw] (meters, degrees).
    • focus_metric

      public double focus_metric
  • Constructor Details

    • LimelightResults

      public LimelightResults()
      Construct a LimelightResults object for JSON Parsing.
  • Method Details

    • getBotPose3d

      public Pose3d getBotPose3d()
      Get the current botpose as a Pose3d object.
      Returns:
      Pose3d object representing the botpose.
      Implementation Note:
      This only returns MegaTag1 poses.
    • getMT2Pose3d

      public Pose3d getMT2Pose3d()
      Get the current Megatag2 pose as a Pose3d object.
      Returns:
      Pose3d object representing the botpose_orb.
    • getBotPose3d

      public Pose3d getBotPose3d(DriverStation.Alliance alliance)
      Get the current botpose as a Pose3d object.
      Parameters:
      alliance - Alliance color to get the botpose for.
      Returns:
      Pose3d object representing the botpose.
      Implementation Note:
      This only returns MegaTag1 poses.
    • getBotPose2d

      public Pose2d getBotPose2d()
      Get the current botpose as a Pose2d object.
      Returns:
      Pose2d object representing the botpose.
    • getBotPose2d

      public Pose2d getBotPose2d(DriverStation.Alliance alliance)
      Get the current botpose as a Pose2d object.
      Parameters:
      alliance - Alliance color to get the botpose for.
      Returns:
      Pose2d object representing the botpose.
    • toString

      public String toString()
      Commonly used but very incomplete set from JSON key from the LL
      Overrides:
      toString in class Object