An AprilGrid is a regular grid of AprilTag fiducial markers arranged with a fixed spacing between adjacent tags. Unlike a plain checkerboard, every tag in the grid carries a unique binary ID, so the detector can identify individual tags even when parts of the board are out of frame or occluded. This makes the AprilGrid the recommended target for all Kalibr calibration workflows.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ethz-asl/kalibr/llms.txt
Use this file to discover all available pages before exploring further.
YAML configuration
Create a YAML file that describes the physical layout of your printed target. Pass this file to any Kalibr command with--target aprilgrid.yaml.
Field reference
| Field | Type | Description |
|---|---|---|
target_type | string | Must be 'aprilgrid' |
tagCols | int | Number of tags along the x-axis (minimum 3) |
tagRows | int | Number of tags along the y-axis (minimum 3) |
tagSize | float | Physical side length of one printed tag, in meters |
tagSpacing | float | Gap between adjacent tags expressed as a fraction of tagSize (e.g. 0.3 means the gap is 30% of the tag side length) |
tagSize must match the physically measured side length of one tag on your printed target. Measure with calipers after printing — do not rely on the nominal value you used when generating the PDF.Generating the PDF
Usekalibr_create_target_pdf to produce a print-ready PDF:
target.pdf file in the current directory. The arguments correspond directly to the YAML fields:
| CLI flag | YAML field | Description |
|---|---|---|
--nx | tagCols | Number of tags horizontally |
--ny | tagRows | Number of tags vertically |
--tsize | tagSize | Tag side length in meters |
--tspace | tagSpacing | Spacing as a fraction of tag size |
Choosing a tag family
AprilTags come in several families that differ in the number of data bits and error correction. Use--tfam to select one:
| Family | Data bits | Notes |
|---|---|---|
t36h11 | 36 | Default. Most codes available, highest robustness. |
t25h9 | 25 | Fewer codes; slightly larger data bits relative to border. |
t25h7 | 25 | Less error correction than t25h9. |
t16h5 | 16 | Fewest codes; use only when tags must be printed very small. |
Skipping tag IDs
If you need to leave certain positions blank — for example to avoid IDs that are already in use by other tags in your environment — use--skip-ids:
Saving an EPS file
Add--eps to also write an EPS vector file alongside the PDF:
Printing and mounting
Print at 100% scale
Open the PDF and disable any fit-to-page or scaling option in your printer dialog. Print at exactly 100% so the dimensions in the PDF correspond to real-world measurements.
Mount on a rigid surface
Glue or tape the printout to a flat, rigid backing such as an aluminum composite panel or thick foam board. Any warping will introduce systematic calibration errors.
How detection works
The Kalibr detector locates each AprilTag independently by decoding its binary ID. It then refines the four corner positions of each tag to subpixel accuracy. The symmetric black squares printed at the inter-tag corners help with this subpixel refinement under motion blur by providing symmetric gradient patterns. Because each tag is uniquely identified, the detector can:- Recover observations from frames where only part of the board is visible
- Reject false detections that would confuse an ID-less pattern like a checkerboard
- Robustly associate detected corners with known 3D positions on the target