Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame^] | 1 | #ifndef Y2024_AUTONOMOUS_AUTO_SPLINES_H_ |
| 2 | #define Y2024_AUTONOMOUS_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 y2024 { |
| 17 | namespace autonomous { |
| 18 | |
| 19 | class AutonomousSplines { |
| 20 | public: |
| 21 | AutonomousSplines() |
| 22 | : test_spline_(aos::JsonFileToFlatbuffer<frc971::MultiSpline>( |
| 23 | "splines/test_spline.json")) {} |
| 24 | static flatbuffers::Offset<frc971::MultiSpline> BasicSSpline( |
| 25 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 26 | *builder, |
| 27 | aos::Alliance alliance); |
| 28 | static flatbuffers::Offset<frc971::MultiSpline> StraightLine( |
| 29 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 30 | *builder, |
| 31 | aos::Alliance alliance); |
| 32 | |
| 33 | flatbuffers::Offset<frc971::MultiSpline> TestSpline( |
| 34 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 35 | *builder, |
| 36 | aos::Alliance alliance); |
| 37 | |
| 38 | private: |
| 39 | aos::FlatbufferDetachedBuffer<frc971::MultiSpline> test_spline_; |
| 40 | }; |
| 41 | |
| 42 | } // namespace autonomous |
| 43 | } // namespace y2024 |
| 44 | |
| 45 | #endif // Y2024_AUTONOMOUS_AUTO_SPLINES_H_ |