> 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`](/api-reference/java-reference/limelight.md). Fetched via `limelight.getData()`. Holds two sub-objects — `targetData` ([`LimelightTargetData`](/api-reference/java-reference/networktables/limelight-target-data.md)) and `pipelineData` ([`LimelightPipelineData`](/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](/api-reference/java-reference/networktables/limelight-target-data.md).            |
| `pipelineData` | `LimelightPipelineData` | Pipeline latency/index/type. See [LimelightPipelineData](/api-reference/java-reference/networktables/limelight-pipeline-data.md). |

***

## Methods

| Method                                 | Returns                      | Description                                                                                                                                                                                                           |
| -------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getResults()`                         | `Optional<LimelightResults>` | Parses the `json` NT entry into a [`LimelightResults`](/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](/api-reference/java-reference/networktables/limelight-results.md)
* [RawFiducial](/api-reference/java-reference/results-and-telemetry/raw-fiducial.md)
* [RawDetection](/api-reference/java-reference/results-and-telemetry/raw-detection.md)
* [LimelightTargetData](/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
