跳到主要内容

AprilTag 地图规范

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

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

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

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

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

type场地类型,例如 frc、ftc、ftcd(ftc 钻石)
FRC 2024 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
}
]
}