Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 1 | #include "aos/events/shm_event_loop.h" |
| 2 | #include "aos/init.h" |
| 3 | #include "y2023/vision/game_pieces.h" |
| 4 | |
| 5 | DEFINE_string(config, "aos_config.json", "Path to the config file to use."); |
| 6 | |
Stephan Pleines | f63bde8 | 2024-01-13 15:59:33 -0800 | [diff] [blame^] | 7 | namespace y2023::vision { |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 8 | namespace { |
| 9 | |
| 10 | void GamePiecesDetectorMain() { |
| 11 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 12 | aos::configuration::ReadConfig(FLAGS_config); |
| 13 | aos::ShmEventLoop event_loop(&config.message()); |
| 14 | GamePiecesDetector game_pieces_detector(&event_loop); |
| 15 | event_loop.Run(); |
| 16 | } |
| 17 | } // namespace |
Stephan Pleines | f63bde8 | 2024-01-13 15:59:33 -0800 | [diff] [blame^] | 18 | } // namespace y2023::vision |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 19 | |
| 20 | int main(int argc, char **argv) { |
| 21 | aos::InitGoogle(&argc, &argv); |
| 22 | y2023::vision::GamePiecesDetectorMain(); |
| 23 | } |