blob: e94d251cbac9530659ecb9d2f554a386de8b4ac6 [file] [log] [blame]
James Kuszmaul5ff8a862021-09-25 17:29:43 -07001namespace y2020.control_loops.drivetrain;
2
3enum 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
15table 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);
James Kuszmaulf75ecd62021-10-23 14:33:46 -070020 camera_x:float (id: 11);
21 camera_y:float (id: 12);
22 camera_theta:float (id: 13);
James Kuszmaul5ff8a862021-09-25 17:29:43 -070023 implied_robot_x:float (id: 4);
24 implied_robot_y:float (id: 5);
25 implied_robot_theta:float (id: 6);
26 implied_turret_goal:float (id: 7);
27 accepted:bool (id: 8);
28 rejection_reason:RejectionReason (id: 9);
29 // Image age (more human-readable than trying to interpret roborio_image_capture_time_ns).
30 image_age_sec:float (id: 10);
31}
32
James Kuszmaulf75ecd62021-10-23 14:33:46 -070033table CumulativeStatistics {
34 total_accepted:int (id: 0);
35 total_candidates:int (id: 1);
36 // Indexed by integer value of RejectionReason enum.
37 rejection_reason_count:[int] (id: 2);
38}
39
James Kuszmaul5ff8a862021-09-25 17:29:43 -070040table LocalizerDebug {
41 matches:[ImageMatchDebug] (id: 0);
James Kuszmaulf75ecd62021-10-23 14:33:46 -070042 statistics:CumulativeStatistics (id: 1);
James Kuszmaul5ff8a862021-09-25 17:29:43 -070043}
44
45root_type LocalizerDebug;