blob: a655e2a7e45d6d3d3a1c1814ae2fcfc8ae2a0019 [file] [log] [blame]
Henry Speiser354d2782022-07-22 13:56:48 -07001#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 Pleinesd99b1ee2024-02-02 20:56:44 -080016namespace y2022_bot3::actors {
Henry Speiser354d2782022-07-22 13:56:48 -070017
18class 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 Pleinesd99b1ee2024-02-02 20:56:44 -080038} // namespace y2022_bot3::actors
Henry Speiser354d2782022-07-22 13:56:48 -070039
40#endif // Y2022_BOT3_ACTORS_AUTO_SPLINES_H_