(ADVANCED) AprilTag Map Specification

Limelight’s field-space localization feature uses .fmap files to compute a robot pose for use by WPILIB’s pose estimators. Our fmap files support maps comprised of different target sizes and different families.

You can use fmaps to define “environments” such as FRC fields, or “objects” such as objects that have several attached AprilTags. To use an fmap, all you need to do is upload it to your Limelight using the interface or one of the upload APIs (coming soon).

The .fmap file is a JSON file containing a single “fiducial” array. Each entry in the fiducial array has the following structure:

family AprilTag/Fiducial family
id Tag ID
size Tag size in mm
transform 4x4 Matrix Transform of the target. Row-Major, SI units.
unique Specifies whether the target is unique in this map or featured multiple times
   

AprilTag Map for FRC 2023 Charged Up

{
    "fiducials": [
        {
        "family": "apriltag3_16h5_classic",
        "id": 1,
        "size": 152.4,
        "transform": [
            -1,
            0,
            0,
            7.24310,
            0,
            -1,
            0,
            -2.93659,
            0,
            0,
            1,
            0.46272,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 2,
        "size": 152.4,
        "transform": [
            -1,
            0,
            0,
            7.24310,
            0,
            -1,
            0,
            -1.26019,
            0,
            0,
            1,
            0.46272,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 3,
        "size": 152.4,
        "transform": [
            -1,
            0,
            0,
            7.24310,
            0,
            -1,
            0,
            0.41621,
            0,
            0,
            1,
            0.46272,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 4,
        "size": 152.4,
        "transform": [
            -1,
            0,
            0,
            7.90832,
            0,
            -1,
            0,
            2.74161,
            0,
            0,
            1,
            0.695452,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 5,
        "size": 152.4,
        "transform": [
            1,
            0,
            0,
            -7.90832,
            0,
            1,
            0,
            2.74161,
            0,
            0,
            1,
            0.695452,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 6,
        "size": 152.4,
        "transform": [
            1,
            0,
            0,
            -7.24310,
            0,
            1,
            0,
            0.41621,
            0,
            0,
            1,
            0.46272,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 7,
        "size": 152.4,
        "transform": [
            1,
            0,
            0,
            -7.24310,
            0,
            1,
            0,
            -1.26019,
            0,
            0,
            1,
            0.46272,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        },
        {
        "family": "apriltag3_16h5_classic",
        "id": 8,
        "size": 152.4,
        "transform": [
            1,
            0,
            0,
            -7.24310,
            0,
            1,
            0,
            -2.93659,
            0,
            0,
            1,
            0.46272,
            0,
            0,
            0,
            1
        ],
        "unique": 1
        }
    ]
}