# Calibration and Cows

Calibrating your robot to a specific field is vital to ensure that your localization, autos, and auto-align functionality remain accurate and consistent. This chapter will discuss the intricacies of field calibration and some methods to do it, as well as how cows are involved.

# WPIcal (infused with holiness)

Here are the docs I will be mostly referencing on this page:

[https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/wpical/index.html](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/wpical/index.html)

WPIcal is a tool made by the ever-lovely Worcester Polytechnic Institute based off of Cow-libration (see future pages) that help your robot understand where it is and account for small variations in tag placements.

#### Calibrate your camera

Start by filming a video with your camera of a ChArUco board (with an odd height if you choose the OpenCV option) making sure to capture various angles to ensure proper calibration.

Example video: [Video of online ChArUco board to calibrate camera](https://drive.google.com/file/d/1JlV7cQjOHY74sIlzgIs0Zp4TgdZl3d28/view?usp=sharing)

<p class="callout info">A ChArUco board can be generated from this link: [calib.io](https://calib.io/pages/camera-calibration-pattern-generator)</p>

After filling out all the fields on WPIcal and selecting Calibrate, check the video displayed and if any squares aren’t detected or there’s other weird looking stuff film your video again.

#### Film your videos

When filming videos of the field, you need at least two AprilTags in each video, and it is preferred if there are more. Don’t sacrifice quality for quantity though, you want WPIcal to still identify the tags you’re filming.

Make sure to always “connect” your videos by having tags in common between them. For example, if your first video is of tags 1, 2, &amp; 3, your next video should include at least one of those three days so the relative distances can be calculated.

#### Calibrate each pinned tag

Pinned tags are the ones most visible by the camera and the ones you are the most confident in. We recommend sorting your videos into folders based on the pinned tag and calibrating those folders individually before combining all the field calibrations.

Before uploading the ideal field map, double check what type of field (ie. AndyMark or welded) is being used at the competition or field you’re calibrating.

You can select which tags are calibrated using the field calibration of WPIcal if only some AprilTags are needed to be more accurate.

After the calibration, select “Visualize calibration” to compare your tags and check that there aren’t crazy differences between the original position and the calibrated position.

Finally, take the final field calibration json and put it in your code to use!

# Cowlibration

Cowlibration is a field calibration tool developed by FRC team #1538, The Holy Cows.

[https://github.com/TheHolyCows/cowlibration-field](https://github.com/TheHolyCows/cowlibration-field)

# Flashing Limelights

You've finally gotten hands on a Limelight to use for vision. Yay! Now, you want to know how to flash the Limelight so you can configure it for your robot. Here's an easy guide for that:

First, download the Limelight Hardware Manager from here, along with the correct operating system file for the type of Limelight you plan to flash: [https://docs.limelightvision.io/docs/resources/downloads](https://docs.limelightvision.io/docs/resources/downloads)

Next, follow the Quick Start instructions for your specific Limelight to find the config button that you hold down, while plugging into your Limelight over USB. For example, the Limelight 4's config button is hidden inside this tiny hole, that we had to press down with a screwdriver.

\[INSERT PHOTO HERE\]

Then, switch the Flash OS section of the Limelight Hardware Manager app, and install your drivers if you haven't already. You'll know when your drivers are installed when you see the Drivers dot turn green at the top of the bar.

**Additionally, if you have balenaEtcher installed from flashing previous SD cards, please make sure you close** **it!**

[![Screenshot 2026-04-18 at 2.09.44 PM.png](https://wiki.yetirobotics.org/uploads/images/gallery/2026-04/scaled-1680-/screenshot-2026-04-18-at-2-09-44-pm.png)](https://wiki.yetirobotics.org/uploads/images/gallery/2026-04/screenshot-2026-04-18-at-2-09-44-pm.png)

Afterward, select your OS's .img or .zip file, make sure the extracted OS is correct, and then select your target device.

[![Screenshot 2026-04-18 at 2.12.05 PM.png](https://wiki.yetirobotics.org/uploads/images/gallery/2026-04/scaled-1680-/screenshot-2026-04-18-at-2-12-05-pm.png)](https://wiki.yetirobotics.org/uploads/images/gallery/2026-04/screenshot-2026-04-18-at-2-12-05-pm.png)

Finally, just hit the green **Flash Device** button and wait for this notification!

[![image.png](https://wiki.yetirobotics.org/uploads/images/gallery/2026-04/scaled-1680-/jz2image.png)](https://wiki.yetirobotics.org/uploads/images/gallery/2026-04/jz2image.png)

Once you get this notification, you are done!

Here are the links to other resources if you still need any more help!

Video Guide for Flashing: [https://vimeo.com/1157367762?fl=pl&amp;fe=cm](https://vimeo.com/1157367762?fl=pl&fe=cm)

Limelight 3 Docs: [https://docs.limelightvision.io/docs/docs-limelight/getting-started/limelight-3#4-updating-limelightos](https://docs.limelightvision.io/docs/docs-limelight/getting-started/limelight-3#4-updating-limelightos)

Limelight 3G Docs: [https://docs.limelightvision.io/docs/docs-limelight/getting-started/limelight-3g#4-updating-limelightos](https://docs.limelightvision.io/docs/docs-limelight/getting-started/limelight-3g#4-updating-limelightos)

Limelight 4 Docs: [https://docs.limelightvision.io/docs/docs-limelight/getting-started/limelight-4#4-updating-limelightos](https://docs.limelightvision.io/docs/docs-limelight/getting-started/limelight-4#4-updating-limelightos)

# Limelight Cowlibration

If you are calibrating a Limelight Camera check the limelight vision docs linked below:

[https://docs.limelightvision.io/docs/docs-limelight/getting-started/performing-charuco-camera-calibration](https://docs.limelightvision.io/docs/docs-limelight/getting-started/performing-charuco-camera-calibration)