blob: ff3ec7ce16f5d6c901ad0fb7369fc0d7e154195c [file] [log] [blame]
Austin Schuh99f7c6a2024-06-25 22:07:44 -07001#include "absl/flags/flag.h"
2
Filip Kujawa3004f202023-02-12 16:41:40 -08003#include "aos/events/shm_event_loop.h"
4#include "aos/init.h"
5#include "y2023/vision/game_pieces.h"
6
Austin Schuh99f7c6a2024-06-25 22:07:44 -07007ABSL_FLAG(std::string, config, "aos_config.json",
8 "Path to the config file to use.");
Filip Kujawa3004f202023-02-12 16:41:40 -08009
Stephan Pleinesf63bde82024-01-13 15:59:33 -080010namespace y2023::vision {
Filip Kujawa3004f202023-02-12 16:41:40 -080011namespace {
12
13void GamePiecesDetectorMain() {
14 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
Austin Schuh99f7c6a2024-06-25 22:07:44 -070015 aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config));
Filip Kujawa3004f202023-02-12 16:41:40 -080016 aos::ShmEventLoop event_loop(&config.message());
17 GamePiecesDetector game_pieces_detector(&event_loop);
18 event_loop.Run();
19}
20} // namespace
Stephan Pleinesf63bde82024-01-13 15:59:33 -080021} // namespace y2023::vision
Filip Kujawa3004f202023-02-12 16:41:40 -080022
23int main(int argc, char **argv) {
24 aos::InitGoogle(&argc, &argv);
25 y2023::vision::GamePiecesDetectorMain();
26}