Add superstructure flatbuffers

Signed-off-by: Nikita Narang <nikitanarang123@gmail.com>
Change-Id: I96892548b6dfdc0437357b964a14d79d7510b08b
diff --git a/y2023/control_loops/superstructure/superstructure_goal.fbs b/y2023/control_loops/superstructure/superstructure_goal.fbs
index 412abbd..47ce7b2 100644
--- a/y2023/control_loops/superstructure/superstructure_goal.fbs
+++ b/y2023/control_loops/superstructure/superstructure_goal.fbs
@@ -4,6 +4,17 @@
 
 
 table Goal {
+    // Used to identify a position in the planned set of positions on the arm.
+    // Controls distal, proximal, and roll joints
+    arm_goal_position:uint32 (id: 0);
+
+    wrist:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 1);
+
+    // If this is true, the rollers should intake.
+    intake:bool (id: 2);
+
+    // If this is true, the rollers should spit.
+    spit:bool (id: 3);
 }
 
 
diff --git a/y2023/control_loops/superstructure/superstructure_output.fbs b/y2023/control_loops/superstructure/superstructure_output.fbs
index 43de3d2..5ac0e38 100644
--- a/y2023/control_loops/superstructure/superstructure_output.fbs
+++ b/y2023/control_loops/superstructure/superstructure_output.fbs
@@ -1,6 +1,21 @@
 namespace y2023.control_loops.superstructure;
 
 table Output {
+    // Proximal arm voltage
+    proximal_voltage:double (id: 0);
+
+    // Distal arm voltage
+    distal_voltage:double (id: 1);
+
+    // roll_voltage for rolling joint
+    roll_joint_voltage:double (id: 2);
+
+    // Wrists rotate end effector rollers
+    // Wrist arm voltage
+    wrist_voltage:double (id: 3);
+
+    // Roller voltage on the end effector
+    roller_voltage:double (id: 4);
 }
 
 root_type Output;
diff --git a/y2023/control_loops/superstructure/superstructure_position.fbs b/y2023/control_loops/superstructure/superstructure_position.fbs
index 49abd28..dc3679d 100644
--- a/y2023/control_loops/superstructure/superstructure_position.fbs
+++ b/y2023/control_loops/superstructure/superstructure_position.fbs
@@ -3,6 +3,21 @@
 namespace y2023.control_loops.superstructure;
 
 table Position {
+    // Zero for proximal is facing parallel to base of robot
+    // Positive position would be rotated upwards
+    proximal:frc971.PotAndAbsolutePosition (id: 0);
+
+    // Zero for distal is facing parallel relative to the shoulder
+    // Positive position would be rotated upwards
+    distal:frc971.PotAndAbsolutePosition (id: 1);
+
+    // Zero for roll joint is up vertically
+    // Positive position would be rotated counterclockwise relative to the robot
+    roll_joint:frc971.PotAndAbsolutePosition (id: 2);
+
+    // Zero for wrist is facing staright outward.
+    // Positive position would be upwards
+    wrist:frc971.PotAndAbsolutePosition (id: 3);
 }
 
 root_type Position;
diff --git a/y2023/control_loops/superstructure/superstructure_status.fbs b/y2023/control_loops/superstructure/superstructure_status.fbs
index ef9667d..ff09317 100644
--- a/y2023/control_loops/superstructure/superstructure_status.fbs
+++ b/y2023/control_loops/superstructure/superstructure_status.fbs
@@ -10,6 +10,14 @@
 
   // If true, we have aborted. This is the or of all subsystem estops.
   estopped:bool (id: 1);
+
+  proximal:frc971.PotAndAbsoluteEncoderEstimatorState (id: 2);
+
+  distal:frc971.PotAndAbsoluteEncoderEstimatorState (id: 3);
+
+  roll_joint:frc971.PotAndAbsoluteEncoderEstimatorState (id: 4);
+
+  wrist:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 5);
 }
 
 root_type Status;