James Kuszmaul | d67f6d2 | 2023-02-05 17:37:25 -0800 | [diff] [blame] | 1 | include "frc971/vision/calibration.fbs"; |
Yash Chainani | 2ac8cb6 | 2023-01-14 16:36:36 -0800 | [diff] [blame] | 2 | include "frc971/vision/target_map.fbs"; |
James Kuszmaul | 667b059 | 2023-02-25 16:32:59 -0800 | [diff] [blame] | 3 | include "y2023/localizer/scoring_map.fbs"; |
James Kuszmaul | d67f6d2 | 2023-02-05 17:37:25 -0800 | [diff] [blame] | 4 | |
| 5 | namespace y2023; |
| 6 | |
| 7 | table CameraConfiguration { |
| 8 | calibration:frc971.vision.calibration.CameraCalibration (id: 0); |
| 9 | } |
| 10 | |
James Kuszmaul | 202e438 | 2023-03-05 14:56:55 -0800 | [diff] [blame] | 11 | // Data point for a single time of flight sensor reading. Used in a linear |
| 12 | // interpolation table. |
| 13 | table TimeOfFlightDatum { |
| 14 | // Time-of-flight sensor reading for the datum. |
| 15 | tof_reading:double (id: 0); |
| 16 | // Where the game piece is laterally in the robot frame. 0 = centered; |
| 17 | // positive = to the left of the robot. |
| 18 | // In meters. |
| 19 | lateral_position:double (id: 1); |
| 20 | } |
| 21 | |
| 22 | table TimeOfFlight { |
| 23 | interpolation_table:[TimeOfFlightDatum] (id: 0); |
| 24 | } |
| 25 | |
| 26 | table RobotConstants { |
| 27 | // Table of time-of-flight reading positions. Until we bother using one |
| 28 | // of our interpolation classes, should just contain two values. |
| 29 | tof:TimeOfFlight (id: 0); |
| 30 | } |
| 31 | |
James Kuszmaul | 4fe845a | 2023-03-26 12:57:30 -0700 | [diff] [blame^] | 32 | // Set of april tag targets, by april tag ID, to ignore when on a |
| 33 | // given alliance. |
| 34 | table IgnoreTargets { |
| 35 | red:[uint64] (id: 0); |
| 36 | blue:[uint64] (id: 1); |
| 37 | } |
| 38 | |
James Kuszmaul | d67f6d2 | 2023-02-05 17:37:25 -0800 | [diff] [blame] | 39 | table Constants { |
| 40 | cameras:[CameraConfiguration] (id: 0); |
Yash Chainani | 2ac8cb6 | 2023-01-14 16:36:36 -0800 | [diff] [blame] | 41 | target_map:frc971.vision.TargetMap (id: 1); |
James Kuszmaul | 667b059 | 2023-02-25 16:32:59 -0800 | [diff] [blame] | 42 | scoring_map:localizer.ScoringMap (id: 2); |
James Kuszmaul | 202e438 | 2023-03-05 14:56:55 -0800 | [diff] [blame] | 43 | robot:RobotConstants (id: 3); |
James Kuszmaul | 4fe845a | 2023-03-26 12:57:30 -0700 | [diff] [blame^] | 44 | ignore_targets:IgnoreTargets (id: 4); |
James Kuszmaul | d67f6d2 | 2023-02-05 17:37:25 -0800 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | root_type Constants; |