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 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 14 | namespace y2019::actors { |
Austin Schuh | 6bcc230 | 2019-03-23 22:28:06 -0700 | [diff] [blame] | 15 | |
| 16 | class AutonomousSplines { |
| 17 | public: |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 18 | // Splines for 2 Panels on the far side of the Rocket |
| 19 | |
| 20 | // 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] | 21 | static flatbuffers::Offset<frc971::MultiSpline> HABToFarRocket( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 22 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 23 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 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( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 28 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 29 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 30 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 31 | |
| 32 | // 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] | 33 | static flatbuffers::Offset<frc971::MultiSpline> HPToFarRocket( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 34 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 35 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 36 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 37 | |
| 38 | // 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] | 39 | static flatbuffers::Offset<frc971::MultiSpline> FarRocketToNearHP( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 40 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 41 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 42 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 43 | |
| 44 | // Splines for 2 Panels on the far reaches of the cargo ship |
| 45 | |
| 46 | // 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] | 47 | static flatbuffers::Offset<frc971::MultiSpline> HABToSecondCargoShipBay( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 48 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 49 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 50 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 51 | |
| 52 | // Path from 2nd cargo ship bay to loading station |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 53 | static flatbuffers::Offset<frc971::MultiSpline> SecondCargoShipBayToHP( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 54 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 55 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 56 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 57 | |
| 58 | // 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] | 59 | static flatbuffers::Offset<frc971::MultiSpline> HPToThirdCargoShipBay( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 60 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 61 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 62 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 63 | |
| 64 | // Path from 3rd cargo ship bay to near the loading station |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 65 | static flatbuffers::Offset<frc971::MultiSpline> ThirdCargoShipBayToNearHP( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 66 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 67 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 68 | bool is_left); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 69 | |
| 70 | // Testing Splines |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 71 | static flatbuffers::Offset<frc971::MultiSpline> HPToNearRocketTest( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 72 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 73 | *builder); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 74 | static flatbuffers::Offset<frc971::MultiSpline> HabToFarRocketTest( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 75 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 76 | *builder, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 77 | bool is_left); |
| 78 | static flatbuffers::Offset<frc971::MultiSpline> FarRocketToHPTest( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 79 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 80 | *builder); |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 81 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 82 | static flatbuffers::Offset<frc971::MultiSpline> BasicSSpline( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 83 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 84 | *builder); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 85 | static flatbuffers::Offset<frc971::MultiSpline> StraightLine( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 86 | aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder |
| 87 | *builder); |
Austin Schuh | 6bcc230 | 2019-03-23 22:28:06 -0700 | [diff] [blame] | 88 | }; |
| 89 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 90 | } // namespace y2019::actors |
Austin Schuh | 6bcc230 | 2019-03-23 22:28:06 -0700 | [diff] [blame] | 91 | |
Austin Schuh | b5b79a5 | 2019-05-08 20:32:07 -0700 | [diff] [blame] | 92 | #endif // Y2019_ACTORS_AUTO_SPLINES_H_ |