blob: 794cf136c50326aaa84c044c73aaf3d6ff05796b [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,
James Kuszmaula3d1cd12021-10-23 22:30:45 -070013 MESSAGE_BRIDGE_DISCONNECTED = 9,
James Kuszmaul5ff8a862021-09-25 17:29:43 -070014}
15
16table ImageMatchDebug {
17 camera:uint8 (id: 0);
18 pose_index: uint8 (id: 1);
19 local_image_capture_time_ns:long (id: 2);
20 roborio_image_capture_time_ns:long (id: 3);
James Kuszmaulf75ecd62021-10-23 14:33:46 -070021 camera_x:float (id: 11);
22 camera_y:float (id: 12);
23 camera_theta:float (id: 13);
James Kuszmaul5ff8a862021-09-25 17:29:43 -070024 implied_robot_x:float (id: 4);
25 implied_robot_y:float (id: 5);
26 implied_robot_theta:float (id: 6);
27 implied_turret_goal:float (id: 7);
28 accepted:bool (id: 8);
29 rejection_reason:RejectionReason (id: 9);
30 // Image age (more human-readable than trying to interpret roborio_image_capture_time_ns).
31 image_age_sec:float (id: 10);
32}
33
James Kuszmaulf75ecd62021-10-23 14:33:46 -070034table CumulativeStatistics {
35 total_accepted:int (id: 0);
36 total_candidates:int (id: 1);
37 // Indexed by integer value of RejectionReason enum.
38 rejection_reason_count:[int] (id: 2);
39}
40
James Kuszmaul5ff8a862021-09-25 17:29:43 -070041table LocalizerDebug {
42 matches:[ImageMatchDebug] (id: 0);
James Kuszmaulf75ecd62021-10-23 14:33:46 -070043 statistics:CumulativeStatistics (id: 1);
James Kuszmaul5ff8a862021-09-25 17:29:43 -070044}
45
46root_type LocalizerDebug;