blob: 87c4b0e705de1d7fd4776099000eafecd1e7fba7 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001include "frc971/control_loops/control_loops.fbs";
2
3namespace y2018.control_loops.superstructure;
4
5table IntakeElasticSensors {
6 // Position of the motor end of the series elastic in radians.
Austin Schuhd7851b02020-11-14 13:46:27 -08007 motor_position:frc971.PotAndAbsolutePosition (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -07008
9 // Displacement of the spring in radians.
Austin Schuhd7851b02020-11-14 13:46:27 -080010 spring_angle:double (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070011
12 // False if the beam break sensor isn't triggered, true if the beam breaker is
13 // triggered.
Austin Schuhd7851b02020-11-14 13:46:27 -080014 beam_break:bool (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070015}
16
17table ArmPosition {
18 // Values of the encoder and potentiometer at the base of the proximal
19 // (connected to drivebase) arm in radians.
Austin Schuhd7851b02020-11-14 13:46:27 -080020 proximal:frc971.PotAndAbsolutePosition (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070021
22 // Values of the encoder and potentiometer at the base of the distal
23 // (connected to proximal) arm in radians.
Austin Schuhd7851b02020-11-14 13:46:27 -080024 distal:frc971.PotAndAbsolutePosition (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070025}
26
27
28table Position {
29 // Values of the series elastic encoders on the left side of the robot from
30 // the rear perspective in radians.
Austin Schuhd7851b02020-11-14 13:46:27 -080031 left_intake:IntakeElasticSensors (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070032
33 // Values of the series elastic encoders on the right side of the robot from
34 // the rear perspective in radians.
Austin Schuhd7851b02020-11-14 13:46:27 -080035 right_intake:IntakeElasticSensors (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070036
Austin Schuhd7851b02020-11-14 13:46:27 -080037 arm:ArmPosition (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070038
39 // Value of the beam breaker sensor. This value is true if the beam is
40 // broken, false if the beam isn't broken.
Austin Schuhd7851b02020-11-14 13:46:27 -080041 claw_beambreak_triggered:bool (id: 3);
Alex Perrycb7da4b2019-08-28 19:35:56 -070042 // Value of the beambreak sensor detecting when the box has hit the frame
43 // cutout.
Austin Schuhd7851b02020-11-14 13:46:27 -080044 box_back_beambreak_triggered:bool (id: 4);
Alex Perrycb7da4b2019-08-28 19:35:56 -070045
46 // Distance to the box in meters.
Austin Schuhd7851b02020-11-14 13:46:27 -080047 box_distance:double (id: 5);
Alex Perrycb7da4b2019-08-28 19:35:56 -070048}
49
50root_type Position;