Milind Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame] | 1 | namespace frc971.vision; |
| 2 | |
| 3 | // Represents 3d pose of an april tag on the field. |
| 4 | table TargetPoseFbs { |
| 5 | // AprilTag ID of this target |
| 6 | id:uint64 (id: 0); |
| 7 | |
| 8 | // Pose of target relative to field origin. |
Milind Upadhyay | c5beba1 | 2022-12-17 17:41:20 -0800 | [diff] [blame] | 9 | // 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 Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame] | 12 | x:double (id: 1); |
| 13 | y:double (id: 2); |
| 14 | z:double (id: 3); |
| 15 | |
Milind Upadhyay | c5beba1 | 2022-12-17 17:41:20 -0800 | [diff] [blame] | 16 | // Orientation of the target. |
Milind Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame] | 17 | 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 |
| 24 | table TargetMap { |
| 25 | target_poses:[TargetPoseFbs] (id: 0); |
Milind Upadhyay | 05652cb | 2022-12-07 20:51:51 -0800 | [diff] [blame] | 26 | |
| 27 | // Unique name of the field |
| 28 | field_name:string (id: 1); |
Maxwell Henderson | febee25 | 2023-01-28 16:53:52 -0800 | [diff] [blame^] | 29 | } |
| 30 | |
| 31 | root_type TargetMap; |