blob: 3c7a33b3dd25d4bd18115bf2dfea423d0b9a7bc0 [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);
41}
42
milind-u37385182023-02-20 15:07:28 -080043table Position {
44 arm:ArmPosition (id: 0);
Nikita Narang27610fc2023-02-08 19:40:31 -080045
Nikita Narang27610fc2023-02-08 19:40:31 -080046 // Zero for wrist is facing staright outward.
47 // Positive position would be upwards
milind-u18a901d2023-02-17 21:51:55 -080048 wrist:frc971.AbsolutePosition (id: 1);
Maxwell Henderson589cf272023-02-22 15:56:40 -080049
50 // If this is true, the cone beam break is triggered.
milind-u3a7f9212023-02-24 20:46:59 -080051 cone_position:double (id: 2);
Maxwell Henderson589cf272023-02-22 15:56:40 -080052
53 // If this is true, the cube beam break is triggered.
54 end_effector_cube_beam_break:bool (id: 3);
milind-u738832d2023-02-24 19:55:54 -080055
56 // Roller falcon data
57 roller_falcon:CANFalcon (id: 4);
Maxwell Hendersonad312342023-01-10 12:07:47 -080058}
59
60root_type Position;