Limelight
Hardware Manager Setup
Video walkthrough: Limelight and Auto Align.
Open Limelight Hardware Manager, double-click your camera, and set the pipeline to AprilTags. Use Full 3D Targeting for field pose. The table below explains the raw NetworkTables values before you tune 3D localization.
Targeting Variables (NetworkTables)
| Variable | Definition | Behavior |
|---|---|---|
| tx | Horizontal Offset | Angle in degrees from the crosshair to the target. Positive (+) when target is to the LEFT. |
| ty | Vertical Offset | Angle in degrees from the crosshair to the target. Positive (+) when target is BELOW the crosshair. |
| ta | Target Area | Percentage (0-100) of the image the target occupies. Larger values indicate the target is closer. |
| tl | Latency | Time in milliseconds from capturing the image to sending it to the robot. Usually ~6ms. |
Coordinate System Warning
Limelight angles are not the same as a typical math graph.
TX: Left of center is positive (right is negative).
TY: Below the crosshair is positive (above is negative).
3D Localization (MegaTag)
Robot Pose in Target Space is relative to the tag. Robot Pose in Field Space plots the robot on the full field—usually easier to sanity-check.
Camera Offset Configuration
Measure the camera relative to the robot center at floor level and enter:
- Meters forward/back
- Meters left/right
- Meters up
- Pitch, yaw, and roll
Why Localization Matters
Wheel odometry drifts when wheels slip or the robot accelerates hard. AprilTag pose gives an absolute field fix so the estimator can correct accumulated error.
Configuration Check
Test your understanding of the Limelight data values.
- If the AprilTag appears to the left of the center crosshair, is tx positive or negative?
- If the robot moves closer to the tag, what happens to the ta value?
- Why is vision localization preferred over pure wheel odometry?