Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 1 | #include <memory> |
| 2 | |
| 3 | #include "aos/events/shm_event_loop.h" |
| 4 | #include "aos/init.h" |
| 5 | #include "frc971/control_loops/drivetrain/drivetrain.h" |
| 6 | #include "y2023/control_loops/drivetrain/drivetrain_base.h" |
| 7 | |
| 8 | using ::frc971::control_loops::drivetrain::DrivetrainLoop; |
| 9 | |
| 10 | int main(int argc, char **argv) { |
| 11 | aos::InitGoogle(&argc, &argv); |
| 12 | |
| 13 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 14 | aos::configuration::ReadConfig("aos_config.json"); |
| 15 | |
| 16 | aos::ShmEventLoop event_loop(&config.message()); |
| 17 | std::unique_ptr<::frc971::control_loops::drivetrain::DeadReckonEkf> |
| 18 | localizer = |
| 19 | std::make_unique<::frc971::control_loops::drivetrain::DeadReckonEkf>( |
| 20 | &event_loop, |
| 21 | ::y2023::control_loops::drivetrain::GetDrivetrainConfig()); |
Ravago Jones | 2060ee6 | 2023-02-03 18:12:24 -0800 | [diff] [blame^] | 22 | std::unique_ptr<DrivetrainLoop> drivetrain = std::make_unique<DrivetrainLoop>( |
| 23 | y2023::control_loops::drivetrain::GetDrivetrainConfig(), &event_loop, |
| 24 | localizer.get()); |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 25 | |
| 26 | event_loop.Run(); |
| 27 | |
| 28 | return 0; |
| 29 | } |