Add catapult MPC and controller class
We want to shoot with the MPC, but we want to decelerate and reset with
a more traditional controller. So, transition to the MPC, and back to a
profiled subsystem.
This makes some tweaks to the solver to get it to converge more
reliably. There's apparently a scale factor which was scaling down the
cost matrices based on the initial p matrix, causing it to not solve
reliably... Good fun.
Change-Id: I721eeaf0b214f8f03cad3112acbef1477671e533
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2022/control_loops/superstructure/superstructure_status.fbs b/y2022/control_loops/superstructure/superstructure_status.fbs
index b4bad2a..8033d8a 100644
--- a/y2022/control_loops/superstructure/superstructure_status.fbs
+++ b/y2022/control_loops/superstructure/superstructure_status.fbs
@@ -18,6 +18,11 @@
intake_back:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 4);
turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 5);
+
+ catapult:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 6);
+
+ solve_time:double (id: 7);
+ mpc_active:bool (id: 8);
}
-root_type Status;
\ No newline at end of file
+root_type Status;