For the complete documentation index, see llms.txt. This page is also available as Markdown.

LimelightTargetData

Package: limelight.networktables

2D and 3D per-target metrics for the currently tracked target, accessed via limelight.getData().targetData. Reflects whatever pipeline is active — retroreflective, AprilTag, classifier, or detector.


Methods

Method
Returns
Description

getTargetStatus()

boolean

true if a valid target is present (tv). Check this before trusting tx/ty/etc.

getHorizontalOffset()

double

Crosshair-relative horizontal offset in degrees (tx).

getVerticalOffset()

double

Crosshair-relative vertical offset in degrees (ty).

getHorizontalOffsetFromPrincipal()

double

Principal-pixel-relative horizontal offset in degrees (txnc). More accurate than tx on a calibrated camera when adjustable crosshair isn't needed.

getVerticalOffsetFromPrincipal()

double

Principal-pixel-relative vertical offset in degrees (tync).

getTargetArea()

double

Target area as a percentage of the image, 0-100 (ta).

getTargetCount()

int

Number of currently detected targets, decoded from the t2d metrics array.

getAprilTagID()

double

Current fiducial ID (tid).

getNeuralClassID()

String

Current neural class name (tclass).

getClassifierClassIndex()

int

Classifier class index, decoded from t2d.

getDetectorClassIndex()

int

Primary detector class index, decoded from t2d.

getTargetColor()

double[]

Target color in HSV/RGB format (tc).

getTargetMetrics()

double[]

Raw t2d array: [targetValid, targetCount, targetLatency, captureLatency, tx, ty, txnc, tync, ta, tid, targetClassIndexDetector, targetClassIndexClassifier, targetLongSidePixels, targetShortSidePixels, targetHorizontalExtentPixels, targetVerticalExtentPixels, targetSkewDegrees].

getStandardDeviations()

Pair<Pose3d, Pose3d>

MegaTag1/MegaTag2 standard deviations as Pair.of(MT1, MT2), decoded from stddevs.

getRobotToTarget()

Pose3d

Robot pose relative to the target (botpose_targetspace).

getCameraToTarget()

Pose3d

Camera pose relative to the target (camerapose_targetspace).

getTargetToCamera()

Pose3d

Target pose relative to the camera (targetpose_cameraspace).

getTargetToRobot()

Pose3d

Target pose relative to the robot (targetpose_robotspace).

See Also

Last updated

Was this helpful?