> 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/documentation/why-yall.md).

# Why YALL?

## The problem with LimelightHelpers

LimelightVision publishes [`LimelightHelpers`](https://github.com/LimelightVision/limelightlib-wpijava) as a single drop-in `.java` file — a set of static methods keyed by raw NetworkTables entry names (`ledMode`, `pipeline_set`, `botpose_wpiblue`, `rawfiducials`, ...). It's simple, but that simplicity has costs:

* Every call re-fetches an NT entry — no typed object holds settings or results for you.
* MegaTag1 vs. MegaTag2, alliance color, and coordinate frame are separate helper methods, easy to mix up.
* Results decode into loose arrays and parallel static fields, not classes.
* There's no chaining — configuring a camera means many independent one-line calls with no obvious grouping.
* AprilTag ambiguity, standard deviations, and per-tag detail live in different places depending on which method you called.

## What YALL replaces it with

YALL models the same underlying NetworkTables API as **one object per camera**, with typed sub-objects for every concern:

```java
Limelight limelight = new Limelight("limelight");

limelight.getSettings()
         .withLimelightLEDMode(LEDMode.PipelineControl)
         .withCameraOffset(cameraOffset)
         .save();

LimelightPoseEstimator poseEstimator = limelight.createPoseEstimator(EstimationMode.MEGATAG2);
```

* **`Limelight`** — one per physical camera, resolves and validates its NT table by name.
* **`LimelightSettings`** — every writable setting as a chainable `.withXXXX()` call.
* **`LimelightPoseEstimator`** / **`PoseEstimate`** — MegaTag1/MegaTag2 pose, alliance-aware, with per-tag ambiguity already decoded for filtering.
* **`LimelightResults`** — the full JSON frame, with typed arrays for every pipeline type instead of parallel loose fields.
* **`LimelightData`** — direct, cheap NetworkTables reads (raw fiducials/detections, barcodes, Python I/O) for callers who don't need the full JSON parse.

## MegaTag2 done correctly

MegaTag2 requires the robot to submit its current heading to the Limelight every loop *before* reading a pose estimate — a step that's easy to get wrong or forget with raw NetworkTables calls. YALL makes the requirement explicit through the API:

```java
limelight.getSettings()
         .withRobotOrientation(new Orientation3d(gyro.getRotation3d(),
                                                  new AngularVelocity3d(DegreesPerSecond.of(gyro.getPitchVelocity()),
                                                                        DegreesPerSecond.of(gyro.getRollVelocity()),
                                                                        DegreesPerSecond.of(gyro.getYawVelocity()))))
         .save();

Optional<PoseEstimate> visionEstimate = limelight.createPoseEstimator(EstimationMode.MEGATAG2).getPoseEstimate();
```

`PoseEstimate` carries `tagCount`, `avgTagDist`, `avgTagArea`, and per-tag `RawFiducial` ambiguity so you can gate `addVisionMeasurement` calls without hand-rolling the array decoding yourself. See [Pose Estimation & Ambiguity](/documentation/understanding/pose-estimation-and-ambiguity.md).

## One API, every pipeline type

Whatever pipeline is active — AprilTag, retroreflective, neural classifier, neural detector, or barcode — `LimelightResults` exposes it as a typed array (`targets_Fiducials`, `targets_Retro`, `targets_Classifier`, `targets_Detector`, `targets_Barcode`) instead of a grab-bag of loosely related fields. See [Target & Pipeline Types](/documentation/understanding/target-and-pipeline-types.md).

## Raw data when you need speed

`getLatestResults()` parses a full JSON payload with Jackson on every call. When a periodic loop only needs tag or detection geometry, `LimelightData.getRawFiducials()` / `getRawDetections()` read the equivalent NetworkTables double-array entries directly — no JSON parsing at all. See [Results JSON vs. Raw NetworkTables](/documentation/understanding/results-json-vs-raw-networktables.md).

## Java and Python, one model

YALL ships a Python port alongside the Java library with the same class names and (mostly) the same method names, so teams that write robot code in Python aren't stuck hand-rolling their own wrapper. See [Python & C++ Support](/documentation/understanding/python-and-cpp-support.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/documentation/why-yall.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.
