James Kuszmaul | 09f564a | 2019-02-18 17:37:09 -0800 | [diff] [blame^] | 1 | package y2019.control_loops.drivetrain; |
| 2 | |
| 3 | // These structures have a nearly one-to-one correspondence to those in |
| 4 | // //y2019/jevois:structures.h. Please refer to that file for details. |
| 5 | struct CameraTarget { |
| 6 | float distance; |
| 7 | float height; |
| 8 | float heading; |
| 9 | float skew; |
| 10 | }; |
| 11 | |
| 12 | message CameraFrame { |
| 13 | // monotonic time in nanoseconds at which frame was taken (note structure.h |
| 14 | // uses age). |
| 15 | int64_t timestamp; |
| 16 | |
| 17 | // Number of targets actually in this frame. |
| 18 | uint8_t num_targets; |
| 19 | |
| 20 | // Buffer for the targets |
| 21 | CameraTarget[3] targets; |
| 22 | |
| 23 | // Index of the camera with which this frame was taken: |
| 24 | uint8_t camera; |
| 25 | }; |
| 26 | |
| 27 | queue CameraFrame camera_frames; |