James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 1 | package y2019.control_loops.drivetrain; |
| 2 | |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 3 | // See the Target structure in //y2019/jevois:structures.h for documentation. |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 4 | struct CameraTarget { |
| 5 | float distance; |
| 6 | float height; |
| 7 | float heading; |
| 8 | float skew; |
| 9 | }; |
| 10 | |
| 11 | message CameraFrame { |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 12 | // Number of nanoseconds since the aos::monotonic_clock epoch at which this |
| 13 | // frame was captured. |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 14 | int64_t timestamp; |
| 15 | |
| 16 | // Number of targets actually in this frame. |
| 17 | uint8_t num_targets; |
| 18 | |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 19 | // Buffer for the targets. |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 20 | CameraTarget[3] targets; |
| 21 | |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 22 | // Index of the camera position (not serial number) which this frame is from. |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 23 | uint8_t camera; |
| 24 | }; |
| 25 | |
| 26 | queue CameraFrame camera_frames; |