跳到主要内容

AprilTag地图规范

Limelight的场地空间定位功能使用.fmap文件来计算机器人姿态,用于WPILIB的姿态估计器。 我们的fmap文件支持由不同目标尺寸和不同标签系列组成的地图。

您可以使用fmap来定义"环境"(如FRC场地)或"物体"(如带有多个AprilTag的物体)。 要使用fmap,您只需要通过界面或REST上传API将其上传到您的Limelight即可。

.fmap文件是一个包含单个"fiducial"数组的JSON文件。 fiducial数组中的每个条目具有以下结构:

familyAprilTag/基准标记系列
id标签ID
size标签尺寸(毫米)
transform目标的4x4矩阵变换。行主序,国际单位。
unique指定目标在此地图中是唯一的还是出现多次

此外,顶层对象有一个指定地图类型的"type"字符串。

type场地类型,如frc、ftc、ftcd(ftc菱形)
2024 FRC Crescendo的AprilTag地图 - 感谢Kevin Hjelstrom
{
"type": "frc",
"fiducials": [
{
"family": "apriltag3_36h11_classic",
"id": 1,
"size": 165.1,
"transform": [
-0.5,
-0.866025,
0,
6.808597,
0.866025,
-0.5,
0,
-3.859403,
0,
0,
1,
1.355852,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 2,
"size": 165.1,
"transform": [
-0.5,
-0.866025,
0,
7.914259,
0.866025,
-0.5,
0,
-3.221609,
0,
0,
1,
1.355852,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 3,
"size": 165.1,
"transform": [
-1.0,
0,
0,
8.308467,
0,
-1.0,
0,
0.877443,
0,
0,
1,
1.451102,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 4,
"size": 165.1,
"transform": [
-1.0,
0,
0,
8.308467,
0,
-1.0,
0,
1.442593,
0,
0,
1,
1.451102,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 5,
"size": 165.1,
"transform": [
0,
1.0,
0,
6.429883,
-1.0,
0,
0,
4.098925,
0,
0,
1,
1.355852,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 6,
"size": 165.1,
"transform": [
0,
1.0,
0,
-6.429375,
-1.0,
0,
0,
4.098925,
0,
0,
1,
1.355852,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 7,
"size": 165.1,
"transform": [
1.0,
-0.0,
0,
-8.308975,
0.0,
1.0,
0,
1.442593,
0,
0,
1,
1.451102,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 8,
"size": 165.1,
"transform": [
1.0,
-0.0,
0,
-8.308975,
0.0,
1.0,
0,
0.877443,
0,
0,
1,
1.451102,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 9,
"size": 165.1,
"transform": [
0.5,
-0.866025,
0,
-7.914767,
0.866025,
0.5,
0,
-3.221609,
0,
0,
1,
1.355852,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 10,
"size": 165.1,
"transform": [
0.5,
-0.866025,
0,
-6.809359,
0.866025,
0.5,
0,
-3.859403,
0,
0,
1,
1.355852,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 11,
"size": 165.1,
"transform": [
0.5,
0.8660254,
0,
3.633851,
-0.8660254,
0.5,
0,
-0.392049,
0,
0,
1,
1.3208,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 12,
"size": 165.1,
"transform": [
0.5,
-0.866025,
0,
3.633851,
0.866025,
0.5,
0,
0.393065,
0,
0,
1,
1.3208,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 13,
"size": 165.1,
"transform": [
-1.0,
0,
0,
2.949321,
0,
-1.0,
0,
-0.000127,
0,
0,
1,
1.3208,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 14,
"size": 165.1,
"transform": [
1.0,
-0.0,
0,
-2.950083,
0.0,
1.0,
0,
-0.000127,
0,
0,
1,
1.3208,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 15,
"size": 165.1,
"transform": [
-0.5,
-0.866025,
0,
-3.629533,
0.866025,
-0.5,
0,
0.393065,
0,
0,
1,
1.3208,
0,
0,
0,
1
],
"unique": 1
},
{
"family": "apriltag3_36h11_classic",
"id": 16,
"size": 165.1,
"transform": [
-0.5,
0.866025,
0,
-3.629533,
-0.866025,
-0.5,
0,
-0.392049,
0,
0,
1,
1.3208,
0,
0,
0,
1
],
"unique": 1
}
]
}