blob: 83ca2b6cbc28085ce0fb24658f56d318cda89305 [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
James Kuszmaulcf451fb2023-03-10 20:42:36 -080050 // Estimated position of a cone in the gripper from the time-of-flight
51 // sensors.
52 // If greater than 0.9, indicates that we cannot see a cone.
53 // Will be larger when the cone is farther forwards on the robot when
54 // the wrist and arm positions are all at zero (this will typically mean
55 // that it is larger when the cone is to the robot's current right when
56 // trying to core).
milind-u3a7f9212023-02-24 20:46:59 -080057 cone_position:double (id: 2);
Maxwell Henderson589cf272023-02-22 15:56:40 -080058
59 // If this is true, the cube beam break is triggered.
60 end_effector_cube_beam_break:bool (id: 3);
milind-u738832d2023-02-24 19:55:54 -080061
62 // Roller falcon data
63 roller_falcon:CANFalcon (id: 4);
Maxwell Hendersonad312342023-01-10 12:07:47 -080064}
65
66root_type Position;