blob: b09e077cba1796c4ef0fa85ade079e366fafeeaf [file] [log] [blame]
Maxwell Hendersonad312342023-01-10 12:07:47 -08001include "frc971/control_loops/control_loops.fbs";
2
3namespace y2023.control_loops.superstructure;
4
milind-u37385182023-02-20 15:07:28 -08005table ArmPosition {
6 // Values of the encoder and potentiometer at the base of the proximal
7 // (connected to drivebase) arm in radians.
milind-u18934eb2023-02-20 16:28:58 -08008 // Zero is upwards, positive is a forwards rotation
milind-u37385182023-02-20 15:07:28 -08009 proximal:frc971.PotAndAbsolutePosition (id: 0);
Nikita Narang27610fc2023-02-08 19:40:31 -080010
milind-u37385182023-02-20 15:07:28 -080011 // Values of the encoder and potentiometer at the base of the distal
12 // (connected to proximal) arm in radians.
milind-u18934eb2023-02-20 16:28:58 -080013 // Zero is straight up, positive is a forwards rotation
milind-u37385182023-02-20 15:07:28 -080014 distal:frc971.PotAndAbsolutePosition (id: 1);
milind-u18a901d2023-02-17 21:51:55 -080015
16 // Zero for roll joint is up vertically
17 // Positive position would be rotated counterclockwise relative to the robot
18 roll_joint:frc971.PotAndAbsolutePosition (id: 2);
milind-u37385182023-02-20 15:07:28 -080019}
20
milind-u738832d2023-02-24 19:55:54 -080021table CANFalcon {
22 // The CAN id of the falcon
23 id:int (id: 0);
24
25 // In Amps
26 supply_current:float (id: 1);
27
28 // In Amps
29 // Stator current where positive current means torque is applied in
30 // the motor's forward direction as determined by its Inverted setting.
31 torque_current:float (id: 2);
32
33 // In Volts
34 supply_voltage:float (id: 3);
35
36 // In degrees Celsius
37 device_temp:float (id: 4);
38
39 // Raw position
40 position:float (id: 5);
Ravago Jones088ca772023-03-25 22:14:24 -070041
42 // Nominal range is -1 to 1, but can be -2 to +2
43 duty_cycle:float (id: 6);
milind-u738832d2023-02-24 19:55:54 -080044}
45
milind-u37385182023-02-20 15:07:28 -080046table Position {
47 arm:ArmPosition (id: 0);
Nikita Narang27610fc2023-02-08 19:40:31 -080048
Nikita Narang27610fc2023-02-08 19:40:31 -080049 // Zero for wrist is facing staright outward.
50 // Positive position would be upwards
milind-u18a901d2023-02-17 21:51:55 -080051 wrist:frc971.AbsolutePosition (id: 1);
Maxwell Henderson589cf272023-02-22 15:56:40 -080052
James Kuszmaulcf451fb2023-03-10 20:42:36 -080053 // Estimated position of a cone in the gripper from the time-of-flight
54 // sensors.
55 // If greater than 0.9, indicates that we cannot see a cone.
56 // Will be larger when the cone is farther forwards on the robot when
57 // the wrist and arm positions are all at zero (this will typically mean
58 // that it is larger when the cone is to the robot's current right when
59 // trying to core).
milind-u3a7f9212023-02-24 20:46:59 -080060 cone_position:double (id: 2);
Maxwell Henderson589cf272023-02-22 15:56:40 -080061
62 // If this is true, the cube beam break is triggered.
63 end_effector_cube_beam_break:bool (id: 3);
milind-u738832d2023-02-24 19:55:54 -080064
65 // Roller falcon data
66 roller_falcon:CANFalcon (id: 4);
Maxwell Hendersonad312342023-01-10 12:07:47 -080067}
68
69root_type Position;