Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 1 | #ifndef Y2022_BOT3_ACTORS_AUTO_SPLINES_H_ |
| 2 | #define Y2022_BOT3_ACTORS_AUTO_SPLINES_H_ |
| 3 | |
| 4 | #include "aos/events/event_loop.h" |
| 5 | #include "aos/flatbuffer_merge.h" |
| 6 | #include "frc971/control_loops/control_loops_generated.h" |
| 7 | #include "frc971/control_loops/drivetrain/drivetrain_goal_generated.h" |
| 8 | #include "frc971/input/joystick_state_generated.h" |
| 9 | /* |
| 10 | |
| 11 | The cooridinate system for the autonomous splines is the same as the spline |
| 12 | python generator and drivetrain spline systems. |
| 13 | |
| 14 | */ |
| 15 | |
| 16 | namespace y2022_bot3 { |
| 17 | namespace actors { |
| 18 | |
| 19 | class AutonomousSplines { |
| 20 | public: |
| 21 | AutonomousSplines() |
| 22 | : test_spline_(aos::JsonFileToFlatbuffer<frc971::MultiSpline>( |
| 23 | "splines/test_spline.json")) {} |
| 24 | |
| 25 | static flatbuffers::Offset<frc971::MultiSpline> BasicSSpline( |
| 26 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
| 27 | static flatbuffers::Offset<frc971::MultiSpline> StraightLine( |
| 28 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
| 29 | |
| 30 | flatbuffers::Offset<frc971::MultiSpline> TestSpline( |
| 31 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 32 | *builder, |
| 33 | aos::Alliance alliance); |
| 34 | |
| 35 | private: |
| 36 | aos::FlatbufferDetachedBuffer<frc971::MultiSpline> test_spline_; |
| 37 | }; |
| 38 | |
| 39 | } // namespace actors |
| 40 | } // namespace y2022_bot3 |
| 41 | |
| 42 | #endif // Y2022_BOT3_ACTORS_AUTO_SPLINES_H_ |