blob: 37260a672ced90d9c90ac7d44e4f91b459859c99 [file] [log] [blame]
Milind Upadhyaycd677a32022-12-04 13:06:43 -08001namespace frc971.vision;
2
3// Represents 3d pose of an april tag on the field.
4table TargetPoseFbs {
5 // AprilTag ID of this target
6 id:uint64 (id: 0);
7
8 // Pose of target relative to field origin.
Milind Upadhyayc5beba12022-12-17 17:41:20 -08009 // To get the pose of the target in the field frame, do:
10 // Translation3d(x, y, z) *
11 // (AngleAxisd(yaw) * AngleAxisd(pitch) * AngleAxisd(roll))
Milind Upadhyaycd677a32022-12-04 13:06:43 -080012 x:double (id: 1);
13 y:double (id: 2);
14 z:double (id: 3);
15
Milind Upadhyayc5beba12022-12-17 17:41:20 -080016 // Orientation of the target.
Milind Upadhyaycd677a32022-12-04 13:06:43 -080017 roll:double (id: 4);
18 pitch:double (id: 5);
19 yaw:double (id: 6);
20}
21
22// Map of all target poses on a field.
23// This would be solved for by TargetMapper
24table TargetMap {
25 target_poses:[TargetPoseFbs] (id: 0);
Milind Upadhyay05652cb2022-12-07 20:51:51 -080026
27 // Unique name of the field
28 field_name:string (id: 1);
Maxwell Hendersonfebee252023-01-28 16:53:52 -080029}
30
31root_type TargetMap;