Refactor year-agnostic catapult code to frc971
This breaks up the y2022 catapult code into multiple files and moves
them into the frc971 folder. Year-specific parameters are now
provided via the constructors, and the goal message is moved into
frc971 as well.
Signed-off-by: Niko Sohmers <nikolai@sohmers.com>
Change-Id: I4ea720ae62a7c6c229d6c24a1f08edd7bc5b9728
diff --git a/y2024/control_loops/superstructure/superstructure_goal.fbs b/y2024/control_loops/superstructure/superstructure_goal.fbs
index c00c70e..63cbcf0 100644
--- a/y2024/control_loops/superstructure/superstructure_goal.fbs
+++ b/y2024/control_loops/superstructure/superstructure_goal.fbs
@@ -1,4 +1,5 @@
include "frc971/control_loops/profiled_subsystem.fbs";
+include "frc971/control_loops/catapult/catapult_goal.fbs";
namespace y2024.control_loops.superstructure;
@@ -15,21 +16,11 @@
RETRACTED = 1,
}
-table CatapultGoal {
- // The target shot position and velocity. If these are provided before fire
- // is called, the optimizer can pre-compute the trajectory.
- shot_position: double (id: 0);
- shot_velocity: double (id: 1);
-
- // Return position of the catapult
- return_position: double (id: 2);
-}
-
table Goal {
intake_roller_goal:IntakeRollerGoal (id: 0);
intake_pivot_goal:IntakePivotGoal (id: 1);
- catapult_goal:CatapultGoal (id: 2);
+ catapult_goal:frc971.control_loops.catapult.CatapultGoal (id: 2);
}
root_type Goal;