AprilTag Generator & Print Sheets
Generate exact vector AprilTag sheets directly from pinned AprilRobotics C family definitions across all 6 classic and reversed-border AprilTag 3 families, with explicit width_at_border vs. total_width sizing.
Export files encode target physical dimensions (1 mm = 72/25.4 pt). Always print PDF at 100% / Actual Size (disable Fit to Page) and measure both X and Y check rulers with a physical caliper or ruler before calibration.
# apriltag_ros (ROS 2) parameters
# size MUST be the width_at_border (black/white boundary) in meters — NOT total_width.
# For tag36h11: width_at_border = 100.00 mm (0.1 m), full grid = 125.00 mm
apriltag:
ros__parameters:
family: "36h11"
size: 0.1
max_hamming: 0
Understanding width_at_border vs. total_width
The most frequent robotics AprilTag pose-estimation bug is confusing the detection boundary width (width_at_border, where the black/white quad edge is detected) with the full upstream layout width (total_width). For reversed-border AprilTag 3 families such as tagStandard41h12, data bits extend outside the black border so total_width / width_at_border = 9 / 5 — passing the full outer width as tag_size introduces a 1.8× linear distance error.
| Family | IDs | Data Bits | width_at_border | total_width | reversed_border | Ratio |
|---|---|---|---|---|---|---|
| tag36h11 | 587 | 36 | 8 | 10 | false | 1.25× |
| tag25h9 | 35 | 25 | 7 | 9 | false | 1.29× |
| tag16h5 | 30 | 16 | 6 | 8 | false | 1.33× |
| tagStandard41h12 | 2115 | 41 | 5 | 9 | true | 1.80× |
| tagCircle21h7 | 38 | 21 | 5 | 9 | true | 1.80× |
| tagCustom48h12 | 42211 | 48 | 6 | 10 | true | 1.67× |
OpenCV vs. AprilRobotics Orientation Convention
Movid renders AprilTags identically to AprilRobotics/apriltag (apriltag_to_image()) and official apriltag-imgs PNGs. Note that OpenCV’s built-in DICT_APRILTAG_16h5, 25h9, and 36h11 use the exact same binary patterns rotated 180° relative to AprilRobotics, and OpenCV does not cover reversed-border AprilTag 3 extended layouts like tagStandard41h12.