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 | |
Austin Schuh | 8a633d5 | 2019-05-12 15:04:01 -0700 | [diff] [blame] | 11 | // Frames from a camera. |
| 12 | // Published on ".y2019.control_loops.drivetrain.camera_frames" |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 13 | message CameraFrame { |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 14 | // Number of nanoseconds since the aos::monotonic_clock epoch at which this |
| 15 | // frame was captured. |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 16 | int64_t timestamp; |
| 17 | |
| 18 | // Number of targets actually in this frame. |
| 19 | uint8_t num_targets; |
| 20 | |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 21 | // Buffer for the targets. |
James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame] | 22 | CameraTarget[3] targets; |
| 23 | |
Brian Silverman | c41fb86 | 2019-03-02 21:14:46 -0800 | [diff] [blame] | 24 | // 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] | 25 | uint8_t camera; |
| 26 | }; |