Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | namespace y2019.control_loops.drivetrain; |
| 2 | |
| 3 | // See the Target structure in //y2019/jevois:structures.h for documentation. |
| 4 | table CameraTarget { |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame] | 5 | distance:float (id: 0); |
| 6 | height:float (id: 1); |
| 7 | heading:float (id: 2); |
| 8 | skew:float (id: 3); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 9 | } |
| 10 | |
| 11 | // Frames from a camera. |
| 12 | table CameraFrame { |
| 13 | // Number of nanoseconds since the aos::monotonic_clock epoch at which this |
| 14 | // frame was captured. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame] | 15 | timestamp:long (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 16 | |
| 17 | // Buffer for the 3 targets. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame] | 18 | targets:[CameraTarget] (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 19 | |
| 20 | // Index of the camera position (not serial number) which this frame is from. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame] | 21 | camera:ubyte (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | root_type CameraFrame; |