James Kuszmaul | 5ff8a86 | 2021-09-25 17:29:43 -0700 | [diff] [blame^] | 1 | namespace y2020.control_loops.drivetrain; |
| 2 | |
| 3 | enum RejectionReason : byte { |
| 4 | IMAGE_FROM_FUTURE = 0, |
| 5 | NO_CALIBRATION = 1, |
| 6 | TURRET_TOO_FAST = 2, |
| 7 | NO_RESULTS = 3, |
| 8 | NO_TRANSFORMS = 4, |
| 9 | HIGH_THETA_DIFFERENCE = 5, |
| 10 | IMAGE_TOO_OLD = 6, |
| 11 | NONFINITE_MEASUREMENT = 7, |
| 12 | CORRECTION_TOO_LARGE = 8, |
| 13 | } |
| 14 | |
| 15 | table ImageMatchDebug { |
| 16 | camera:uint8 (id: 0); |
| 17 | pose_index: uint8 (id: 1); |
| 18 | local_image_capture_time_ns:long (id: 2); |
| 19 | roborio_image_capture_time_ns:long (id: 3); |
| 20 | implied_robot_x:float (id: 4); |
| 21 | implied_robot_y:float (id: 5); |
| 22 | implied_robot_theta:float (id: 6); |
| 23 | implied_turret_goal:float (id: 7); |
| 24 | accepted:bool (id: 8); |
| 25 | rejection_reason:RejectionReason (id: 9); |
| 26 | // Image age (more human-readable than trying to interpret roborio_image_capture_time_ns). |
| 27 | image_age_sec:float (id: 10); |
| 28 | } |
| 29 | |
| 30 | table LocalizerDebug { |
| 31 | matches:[ImageMatchDebug] (id: 0); |
| 32 | } |
| 33 | |
| 34 | root_type LocalizerDebug; |