We utilize a tool provided by WPIlib called WPIcal, which is meant to provide an easier way to calibrate your field. The documentation for this tool (found here) can at points be somewhat confusing, so we revised WPIlib's documentation for the tool here.
Open WPIlib and the project you want to work on. Click on the Command Palette and search "Start Tool", click on it and it should bring you to a list of tools you have access to. Click "wpical", which will open the software.
"Upload Camera Intrinsics" or "Calibrate Camera" — click "Calibrate Camera" (this step is the most time-consuming, and has the most sub-steps)
This is where you upload a video of the ChArUco board you are calibrating with. 930 uses a 15x15 board, but if you don't have a board they can be generated here
"MRcal" or "OpenCV" — choose "MRcal"
These are the two ways to calibrate your camera. We use "MRcal" as it provides slightly more accurate data, and is more robust against bad calibration data
"Select Camera Calibration Video" — upload a 4-5 second video file (taken on a phone/tablet) of your ChArUco board
Your board should be flat on the ground/up against a wall, and the video should be of the full board, not just a section of it. Make sure your board doesn't have any glare in the video
"Square Width" and "Marker Width" — input the width in inches of your ChArUco board squares and markers
You can find this information at the bottom of your ChArUco board. Often times the data will be in millimeters, so make sure to convert to inches
"Board Width" and "Board Height" — input the width/height of board
This data is not the width/height in inches, instead its the number of squares on the board. For example, the board 930 currently uses is 15x15. This information should also be at the bottom of your ChArUco board
"Image Width" and "Image Height" — input (in pixels) the width/height of the video that was used in the "Select Camera Calibration Video" input
To find this information, open up the video in files. Click the three dots, and select "Properties". The information should be under "Camera Resolution"
Click "Calibrate" to finish this step
"Select Field Map JSON" — Upload the field map for this year's game
You can find the download for the field map here, make sure you choose the JSON download
"Select Field Calibration Folder" — upload the folder with all the videos taken of AprilTags on your field
This is where you upload videos taken of AprilTags on your field. Each video recorded should be of two tags, recorded at multiple angles, with parts of the video depicting only one tag, both, etc. The videos should be around 8-10 seconds each. The tags recorded should clearly link back to a single tag (which will be your pinned tag). For example, if your pinned tag is tag #1, your first video should consist of tags #1-2, your second video should consist of tags #2-3, your third video tags #3-4, etc.
These videos should be in a single folder, with no other content residing in that folder
The videos should be shot on the same phone/tablet that was used to take the video of your ChArUco board
"Pinned Tag" — input your pinned tag
This should be the tag you selected to pin while completing the "Select Field Calibration Folder" step
Click "Calibrate!!!" to complete!
WPIlib will ask you which directory you would like the field outputs to go to. The folder you choose to place them in should be empty