blob: 9da6bc67e219e46f83a6061684729fef814e650a [file] [log] [blame]
milind-u086d7262022-01-19 20:44:18 -08001#ifndef Y2022_ACTORS_AUTO_SPLINES_H_
2#define Y2022_ACTORS_AUTO_SPLINES_H_
3
4#include "aos/events/event_loop.h"
Ravago Jones81e50632022-03-11 16:23:51 -08005#include "aos/flatbuffer_merge.h"
milind-u086d7262022-01-19 20:44:18 -08006#include "frc971/control_loops/control_loops_generated.h"
7#include "frc971/control_loops/drivetrain/drivetrain_goal_generated.h"
Ravago Jones81e50632022-03-11 16:23:51 -08008#include "frc971/input/joystick_state_generated.h"
milind-u086d7262022-01-19 20:44:18 -08009/*
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
16namespace y2022 {
17namespace actors {
18
19class AutonomousSplines {
20 public:
Ravago Jones81e50632022-03-11 16:23:51 -080021 AutonomousSplines()
22 : test_spline_(aos::JsonFileToFlatbuffer<frc971::MultiSpline>(
23 "splines/test_spline.json")) {}
24
milind-u086d7262022-01-19 20:44:18 -080025 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);
Ravago Jones81e50632022-03-11 16:23:51 -080029
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_;
milind-u086d7262022-01-19 20:44:18 -080037};
38
39} // namespace actors
40} // namespace y2022
41
42#endif // Y2022_ACTORS_AUTO_SPLINES_H_