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 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 16 | namespace y2022_bot3::actors { |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 17 | |
| 18 | class AutonomousSplines { |
| 19 | public: |
| 20 | AutonomousSplines() |
| 21 | : test_spline_(aos::JsonFileToFlatbuffer<frc971::MultiSpline>( |
| 22 | "splines/test_spline.json")) {} |
| 23 | |
| 24 | static flatbuffers::Offset<frc971::MultiSpline> BasicSSpline( |
| 25 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
| 26 | static flatbuffers::Offset<frc971::MultiSpline> StraightLine( |
| 27 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
| 28 | |
| 29 | flatbuffers::Offset<frc971::MultiSpline> TestSpline( |
| 30 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 31 | *builder, |
| 32 | aos::Alliance alliance); |
| 33 | |
| 34 | private: |
| 35 | aos::FlatbufferDetachedBuffer<frc971::MultiSpline> test_spline_; |
| 36 | }; |
| 37 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 38 | } // namespace y2022_bot3::actors |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 39 | |
| 40 | #endif // Y2022_BOT3_ACTORS_AUTO_SPLINES_H_ |