Austin Schuh | 6bcc230 | 2019-03-23 22:28:06 -0700 | [diff] [blame] | 1 | #ifndef Y2019_ACTORS_AUTO_SPLINES_H_ |
| 2 | #define Y2019_ACTORS_AUTO_SPLINES_H_ |
| 3 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 4 | #include "aos/events/event_loop.h" |
| 5 | #include "frc971/control_loops/control_loops_generated.h" |
| 6 | #include "frc971/control_loops/drivetrain/drivetrain_goal_generated.h" |
Austin Schuh | 6bcc230 | 2019-03-23 22:28:06 -0700 | [diff] [blame] | 7 | /* |
| 8 | |
| 9 | The cooridinate system for the autonomous splines is the same as the spline |
| 10 | python generator and drivetrain spline systems. |
| 11 | |
| 12 | */ |
| 13 | |
| 14 | namespace y2019 { |
| 15 | namespace actors { |
| 16 | |
| 17 | class AutonomousSplines { |
| 18 | public: |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 19 | // Splines for 2 Panels on the far side of the Rocket |
| 20 | |
| 21 | // Path off of level 2 to the far side of the rocket with a panel |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 22 | static flatbuffers::Offset<frc971::MultiSpline> HABToFarRocket( |
| 23 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 24 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 25 | |
| 26 | // Path from the far side of the rocket to the loading station to pickup |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 27 | static flatbuffers::Offset<frc971::MultiSpline> FarRocketToHP( |
| 28 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 29 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 30 | |
| 31 | // Path from the far side of the rocket to the loading station to pickup |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 32 | static flatbuffers::Offset<frc971::MultiSpline> HPToFarRocket( |
| 33 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 34 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 35 | |
| 36 | // Path from the far side of the rocket to close to the loading station |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 37 | static flatbuffers::Offset<frc971::MultiSpline> FarRocketToNearHP( |
| 38 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 39 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 40 | |
| 41 | // Splines for 2 Panels on the far reaches of the cargo ship |
| 42 | |
| 43 | // Path from level 2 to 2nd cargo ship bay with a hatch panel |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 44 | static flatbuffers::Offset<frc971::MultiSpline> HABToSecondCargoShipBay( |
| 45 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 46 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 47 | |
| 48 | // Path from 2nd cargo ship bay to loading station |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 49 | static flatbuffers::Offset<frc971::MultiSpline> SecondCargoShipBayToHP( |
| 50 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 51 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 52 | |
| 53 | // Path from loading station to 3rd cargo ship bay with a hatch panel |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 54 | static flatbuffers::Offset<frc971::MultiSpline> HPToThirdCargoShipBay( |
| 55 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 56 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 57 | |
| 58 | // Path from 3rd cargo ship bay to near the loading station |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 59 | static flatbuffers::Offset<frc971::MultiSpline> ThirdCargoShipBayToNearHP( |
| 60 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 61 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 62 | |
| 63 | // Testing Splines |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 64 | static flatbuffers::Offset<frc971::MultiSpline> HPToNearRocketTest( |
| 65 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
| 66 | static flatbuffers::Offset<frc971::MultiSpline> HabToFarRocketTest( |
| 67 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder, |
| 68 | bool is_left); |
| 69 | static flatbuffers::Offset<frc971::MultiSpline> FarRocketToHPTest( |
| 70 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 71 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 72 | static flatbuffers::Offset<frc971::MultiSpline> BasicSSpline( |
| 73 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
| 74 | static flatbuffers::Offset<frc971::MultiSpline> StraightLine( |
| 75 | aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder); |
Austin Schuh | 6bcc230 | 2019-03-23 22:28:06 -0700 | [diff] [blame] | 76 | }; |
| 77 | |
| 78 | } // namespace actors |
| 79 | } // namespace y2019 |
| 80 | |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 81 | #endif // Y2019_ACTORS_AUTO_SPLINES_H_ |