> For the complete documentation index, see [llms.txt](https://yall.yassrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-data.md).

# LimelightData

**Package:** `limelight.networktables`

Read-only NetworkTables data access for a [`Limelight`](https://yall.yassrobotics.com/api-reference/java-reference/limelight.md). Fetched via `limelight.getData()`. Holds two sub-objects — `targetData` ([`LimelightTargetData`](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-target-data.md)) and `pipelineData` ([`LimelightPipelineData`](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-pipeline-data.md)) — plus JSON results parsing and raw NT reads that aren't part of the JSON blob.

***

## Fields

| Field          | Type                    | Description                                                                                                                                                    |
| -------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `targetData`   | `LimelightTargetData`   | 2D/3D target metrics. See [LimelightTargetData](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-target-data.md).            |
| `pipelineData` | `LimelightPipelineData` | Pipeline latency/index/type. See [LimelightPipelineData](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-pipeline-data.md). |

***

## Methods

| Method                                 | Returns                      | Description                                                                                                                                                                                                                                        |
| -------------------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getResults()`                         | `Optional<LimelightResults>` | Parses the `json` NT entry into a [`LimelightResults`](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-results.md). Empty if the LL GUI's "Send JSON over NT?" option is off or nothing has been published yet. |
| `getRawFiducials()`                    | `RawFiducial[]`              | Decodes the `rawfiducials` double array (7 values per tag) into typed structs.                                                                                                                                                                     |
| `getRawDetections()`                   | `RawDetection[]`             | Decodes the `rawdetections` double array (12 values per detection) into typed structs.                                                                                                                                                             |
| `getCamera2Robot()`                    | `Pose3d`                     | Camera pose relative to the robot, from `camerapose_robotspace`.                                                                                                                                                                                   |
| `getClassifierClass()`                 | `String`                     | Current neural classifier result class name (`tcclass`).                                                                                                                                                                                           |
| `getDetectorClass()`                   | `String`                     | Primary neural detector result class name (`tdclass`).                                                                                                                                                                                             |
| `getBarcodeData()`                     | `String[]`                   | Decoded barcode strings (`rawbarcodes`).                                                                                                                                                                                                           |
| `getPythonData()`                      | `double[]`                   | Output array from a custom Python SnapScript pipeline (`llpython`).                                                                                                                                                                                |
| `setPythonData(double[] outgoingData)` | `void`                       | Writes input data for a custom Python SnapScript pipeline (`llrobot`).                                                                                                                                                                             |
| `takeSnapshot()`                       | `void`                       | Increments the `snapshot` counter to trigger a rising-edge snapshot. Rate-limited to once per 10 frames.                                                                                                                                           |

***

## Raw NetworkTables vs. JSON Results

`getRawFiducials()` / `getRawDetections()` read individual NT entries directly and are cheaper per-call than `getResults()`, which parses a full JSON payload with Jackson every call. Use the raw accessors in a tight periodic loop when you only need tag/detection geometry; use `getResults()` when you need the full frame — target arrays for every pipeline type, hardware/IMU telemetry, or multiple bot-pose variants at once.

## See Also

* [LimelightResults](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-results.md)
* [RawFiducial](https://yall.yassrobotics.com/api-reference/java-reference/results-and-telemetry/raw-fiducial.md)
* [RawDetection](https://yall.yassrobotics.com/api-reference/java-reference/results-and-telemetry/raw-detection.md)
* [LimelightTargetData](https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-target-data.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://yall.yassrobotics.com/api-reference/java-reference/networktables/limelight-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
