| namespace frc971.vision; |
| |
| table Position { |
| x:double (id: 0); |
| y:double (id: 1); |
| z:double (id: 2); |
| } |
| |
| table Quaternion { |
| w:double (id: 0); |
| x:double (id: 1); |
| y:double (id: 2); |
| z:double (id: 3); |
| } |
| |
| // Represents 3d pose of an april tag on the field. |
| table TargetPoseFbs { |
| // AprilTag ID of this target |
| id:uint64 (id: 0); |
| |
| // Pose of target relative to either the field origin or robot. |
| // To get the pose of the target, do: |
| // Translation3d(position.x(), position.y(), position.z()) * |
| // Quaterniond(orientation.w(), orientation.x(), orientation.y(), orientation.z()) |
| position:Position (id: 1); |
| orientation:Quaternion (id: 2); |
| } |
| |
| // Map of all target poses on a field. |
| // There are two possible uses for this: |
| // 1. Static april tag poses on the field solved for by TargetMapper. |
| // 2. List of detected april poses relative to the robot. |
| table TargetMap { |
| target_poses:[TargetPoseFbs] (id: 0); |
| |
| // Unique name of the field (for use case 1.) |
| field_name:string (id: 1); |
| |
| // End-of-frame timestamp for the frame with tag detections. |
| // (for use case 2.). |
| monotonic_timestamp_ns:int64 (id: 2); |
| } |
| |
| root_type TargetMap; |