Class Limelight.LimelightResults
java.lang.Object
com.limelightvision.Limelight.LimelightResults
- Enclosing class:
Limelight
The complete decoded results for one frame. All fields come from one MessagePack payload.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleAverage area of contributing tags (percentage of image).doubleAverage distance to contributing tags in meters.double[]Final camera pose in robot space [x, y, z, roll, pitch, yaw] (meters, degrees).doubleCapture latency in milliseconds.Classifier results below the confidence threshold.Non-empty if the envelope failed to decode.doubleFocus metric for focus-assist.longFrame counter starting at 0, or -1 before the first frame.intHardware type identifier.booleanTrue if the camera is ignoring NetworkTables input.intImage source index.booleanTrue if the camera is connected to a NetworkTables server.longNetworkTables server time in microseconds.doubleTime spent decoding this envelope on the robot, in milliseconds.booleanTrue if the camera is running a robot-published pipeline configuration override.Pipeline configuration override state reported by the camera.doubleActive pipeline index.Active pipeline type (e.g.double[]Data set by a python snapscript via llpython.doubleLocal NetworkTables time when this frame arrived, in seconds.intNumber of AprilTags contributing to the botpose estimates.double[]MegaTag1 robot pose in field space [x, y, z, roll, pitch, yaw] (meters, degrees).double[]MegaTag1 robot pose, WPILib blue-alliance coordinate system.double[]MegaTag1 robot pose, WPILib red-alliance coordinate system.double[]MegaTag2 robot pose in field space.double[]MegaTag2 robot pose, WPILib blue-alliance coordinate system.double[]MegaTag2 robot pose, WPILib red-alliance coordinate system.booleanTrue if the camera is localizing against the robot-published shared field map.Shared field map state reported by the camera.double[]Camera-reported MegaTag1 standard deviations [x, y, z, roll, pitch, yaw].double[]Camera-reported MegaTag2 standard deviations [x, y, z, roll, pitch, yaw].longSystem wall-clock time in microseconds since epoch.doubleMax distance between contributing tags in meters.doublePrimary target area (percentage of image, 0-100).double3D distance from camera to primary target in meters.doubleTargeting/pipeline latency in milliseconds.longMicroseconds since vision-process boot.doubleLegacy timestamp in milliseconds since vision-process boot.doubleHorizontal offset from crosshair to primary target in degrees.doubleHorizontal offset from principal pixel to primary target in degrees.doubleVertical offset from crosshair to primary target in degrees.doubleVertical offset from principal pixel to primary target in degrees.intUI refresh counter.booleanTrue if at least one target is valid in this frame. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns seconds since this frame arrived.org.wpilib.math.geometry.Pose3dReturns camera pose in robot space (meters, degrees).org.wpilib.math.geometry.Pose3dReturns the full 3D robot pose for the given estimate type.org.wpilib.math.geometry.Pose3dReturns megaTag1 robot pose in field space (field-center origin).org.wpilib.math.geometry.Pose3dReturns megaTag2 robot pose in field space.intReturns total number of retro, fiducial, detector, classifier, and barcode targets.
-
Field Details
-
valid
public boolean validTrue if at least one target is valid in this frame. -
timestampMillis
public double timestampMillisLegacy timestamp in milliseconds since vision-process boot. -
timestampMicros
public long timestampMicrosMicroseconds since vision-process boot. -
systemTimestampMicros
public long systemTimestampMicrosSystem wall-clock time in microseconds since epoch. -
ntTimestampMicros
public long ntTimestampMicrosNetworkTables server time in microseconds. 0 if the camera is not connected to a server -
frameIndex
public long frameIndexFrame counter starting at 0, or -1 before the first frame. -
targetingLatencyMillis
public double targetingLatencyMillisTargeting/pipeline latency in milliseconds. -
captureLatencyMillis
public double captureLatencyMillisCapture latency in milliseconds. -
pipelineIndex
public double pipelineIndexActive pipeline index. -
pipelineType
Active pipeline type (e.g. "pipe_fiducial") -
focusMetric
public double focusMetricFocus metric for focus-assist. -
stdDevsMT1
public double[] stdDevsMT1Camera-reported MegaTag1 standard deviations [x, y, z, roll, pitch, yaw]. The camera averages these over a long window. Use for telemetry only. Do not use for fusion -
stdDevsMT2
public double[] stdDevsMT2Camera-reported MegaTag2 standard deviations [x, y, z, roll, pitch, yaw]. The camera averages these over a long window. Use for telemetry only. Do not use for fusion -
robotPoseMT1
public double[] robotPoseMT1MegaTag1 robot pose in field space [x, y, z, roll, pitch, yaw] (meters, degrees). -
robotPoseMT1WpiRed
public double[] robotPoseMT1WpiRedMegaTag1 robot pose, WPILib red-alliance coordinate system. -
robotPoseMT1WpiBlue
public double[] robotPoseMT1WpiBlueMegaTag1 robot pose, WPILib blue-alliance coordinate system. -
robotPoseMT2
public double[] robotPoseMT2MegaTag2 robot pose in field space. -
robotPoseMT2WpiRed
public double[] robotPoseMT2WpiRedMegaTag2 robot pose, WPILib red-alliance coordinate system. -
robotPoseMT2WpiBlue
public double[] robotPoseMT2WpiBlueMegaTag2 robot pose, WPILib blue-alliance coordinate system. -
reportedTagCount
public int reportedTagCountNumber of AprilTags contributing to the botpose estimates. -
tagSpanMeters
public double tagSpanMetersMax distance between contributing tags in meters. -
avgTagDistanceMeters
public double avgTagDistanceMetersAverage distance to contributing tags in meters. -
avgTagAreaPercent
public double avgTagAreaPercentAverage area of contributing tags (percentage of image). -
cameraPoseRobotSpace
public double[] cameraPoseRobotSpaceFinal camera pose in robot space [x, y, z, roll, pitch, yaw] (meters, degrees). -
pythonOutput
public double[] pythonOutputData set by a python snapscript via llpython. -
txDegrees
public double txDegreesHorizontal offset from crosshair to primary target in degrees. -
tyDegrees
public double tyDegreesVertical offset from crosshair to primary target in degrees. -
txDegreesNoCrosshair
public double txDegreesNoCrosshairHorizontal offset from principal pixel to primary target in degrees. -
tyDegreesNoCrosshair
public double tyDegreesNoCrosshairVertical offset from principal pixel to primary target in degrees. -
targetAreaPercent
public double targetAreaPercentPrimary target area (percentage of image, 0-100). -
targetDistanceMeters
public double targetDistanceMeters3D distance from camera to primary target in meters. -
retroTargets
-
fiducialTargets
-
detectorTargets
-
classifierTargets
-
classifierTargetsRejected
Classifier results below the confidence threshold. For visualization and debugging -
barcodeTargets
-
counterTargets
-
ocrTargets
-
imu
-
hardware
-
rewind
-
robotOrientation
-
intrinsics
-
imageSource
public int imageSourceImage source index. -
hardwareType
public int hardwareTypeHardware type identifier. -
uiRefresh
public int uiRefreshUI refresh counter. -
ignoreNT
public boolean ignoreNTTrue if the camera is ignoring NetworkTables input. -
ntConnected
public boolean ntConnectedTrue if the camera is connected to a NetworkTables server. -
pipelineConfigurationOverrideActive
public boolean pipelineConfigurationOverrideActiveTrue if the camera is running a robot-published pipeline configuration override. -
pipelineConfigurationOverrideState
Pipeline configuration override state reported by the camera. -
parseLatencyMillis
public double parseLatencyMillisTime spent decoding this envelope on the robot, in milliseconds. Library-side overhead for logging, not part of the camera's latency. -
receiveTimestampSeconds
public double receiveTimestampSecondsLocal NetworkTables time when this frame arrived, in seconds. 0 if this object did not come from the network -
error
Non-empty if the envelope failed to decode.
-
-
Constructor Details
-
LimelightResults
public LimelightResults()
-
-
Method Details
-
getAgeSeconds
public double getAgeSeconds()Returns seconds since this frame arrived.- Returns:
- Seconds since this frame arrived. If this value keeps growing, the camera has stopped sending frames. Possible causes: disconnected, stopped, or renamed.
-
getTargetCount
public int getTargetCount()Returns total number of retro, fiducial, detector, classifier, and barcode targets.- Returns:
- Total number of retro, fiducial, detector, classifier, and barcode targets. Counter and OCR results are not included
-
getRobotPose_MT1
public org.wpilib.math.geometry.Pose3d getRobotPose_MT1()Returns megaTag1 robot pose in field space (field-center origin).- Returns:
- MegaTag1 robot pose in field space (field-center origin)
-
getRobotPose_MT2
public org.wpilib.math.geometry.Pose3d getRobotPose_MT2()Returns megaTag2 robot pose in field space.- Returns:
- MegaTag2 robot pose in field space. The origin is the field center
-
getRobotPose
Returns the full 3D robot pose for the given estimate type.- Returns:
- The full 3D robot pose for the given estimate type. The type selects the origin and the algorithm
-
getCameraPose_RobotSpace
public org.wpilib.math.geometry.Pose3d getCameraPose_RobotSpace()Returns camera pose in robot space (meters, degrees).- Returns:
- Camera pose in robot space (meters, degrees)
-