blob: 40d609fe7f269028a0bda159d0334f1825f184c2 [file] [log] [blame]
Jim Ostrowskicb8b4082024-01-21 02:23:46 -08001include "frc971/vision/calibration.fbs";
Niko Sohmers3860f8a2024-01-12 21:05:19 -08002include "frc971/vision/target_map.fbs";
Niko Sohmersb21dbdc2024-01-20 20:06:59 -08003include "frc971/control_loops/profiled_subsystem.fbs";
4include "frc971/zeroing/constants.fbs";
James Kuszmaul2549e752024-01-20 17:42:51 -08005include "frc971/control_loops/drivetrain/drivetrain_config.fbs";
Niko Sohmers3860f8a2024-01-12 21:05:19 -08006
7namespace y2024;
8
Jim Ostrowskicb8b4082024-01-21 02:23:46 -08009table CameraConfiguration {
10 calibration:frc971.vision.calibration.CameraCalibration (id: 0);
11}
12
Maxwell Henderson93f37f22024-01-19 17:08:23 -080013table ShotParams {
14 shot_velocity: double (id: 0);
15 shot_angle: double (id: 1);
16}
17
18table InterpolationTablePoint {
19 distance_from_goal: double (id: 0);
20 shot_params: ShotParams (id: 1);
21}
Niko Sohmers3860f8a2024-01-12 21:05:19 -080022
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080023// Amount of voltage to give to the intake rollers when:
James Kuszmaul2549e752024-01-20 17:42:51 -080024// spitting, which represents voltage when IntakeRollerGoal is SPITTING
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080025// and intaking, which represents voltage when IntakeRollerGoal is INTAKING
26table IntakeRollerVoltages {
27 spitting:double (id: 0);
28 intaking:double (id: 1);
29}
Niko Sohmers3860f8a2024-01-12 21:05:19 -080030
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080031// Set points for the pivot in radians when:
32// extended, which represents radians for when IntakePivotGoal is EXTENDED
33// and retracted, which represents radians for when IntakePivotGoal is RETRACTED or NONE
34table IntakePivotSetPoints {
35 extended:double (id: 0);
36 retracted:double (id: 1);
37}
38
Filip Kujawa37aa0bc2024-01-31 20:59:49 -080039// Set points for the climber in meters when:
40// fully extended, which represents meters for when ClimberGoal is FULL_EXTEND
41// partially extended, which represents meters for when ClimberGoal is HALF_EXTEND
42// and retracted, which represents meters for when ClimberGoal is RETRACT
43table ClimberSetPoints {
44 full_extend:double (id: 0);
45 half_extend:double (id: 1);
46 retract:double (id: 2);
47}
48
49table PotAndAbsEncoderConstants {
50 zeroing_constants:frc971.zeroing.PotAndAbsoluteEncoderZeroingConstants (id: 0);
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080051 potentiometer_offset:double (id: 1);
52}
53
Niko Sohmers1259b2a2024-01-29 18:00:37 -080054// Stores current limits for motors
55table CurrentLimits {
56 intake_pivot_supply_current_limit:double (id: 0);
57 intake_pivot_stator_current_limit:double (id: 1);
58 intake_roller_supply_current_limit:double (id: 2);
59 intake_roller_stator_current_limit:double (id: 3);
Niko Sohmersed7ffc42024-02-03 16:05:19 -080060 transfer_roller_supply_current_limit:double (id: 4);
61 transfer_roller_stator_current_limit:double (id: 5);
Maxwell Hendersonfb3bfea2024-02-03 19:24:46 -080062 drivetrain_supply_current_limit:double (id: 6);
63 drivetrain_stator_current_limit:double (id: 7);
Filip Kujawa749f2442024-02-04 01:12:35 -080064 climber_supply_current_limit:double (id: 8);
65 climber_stator_current_limit:double (id: 9);
Niko Sohmers1259b2a2024-01-29 18:00:37 -080066}
67
Nathan Leongb7a81bf2024-02-03 16:04:17 -080068table TransferRollerVoltages {
69 transfer_in:double (id: 0);
70 transfer_out:double (id: 1);
71}
72
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080073table RobotConstants {
Filip Kujawa37aa0bc2024-01-31 20:59:49 -080074 intake_constants:PotAndAbsEncoderConstants (id: 0);
75 climber_constants:PotAndAbsEncoderConstants (id: 1);
76
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080077}
78
79// Common table for constants unrelated to the robot
80table Common {
81 target_map:frc971.vision.TargetMap (id: 0);
82 shooter_interpolation_table: [InterpolationTablePoint] (id: 1);
83 intake_roller_voltages:IntakeRollerVoltages (id : 2);
84 intake_pivot_set_points:IntakePivotSetPoints (id: 3);
85 intake_pivot:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 4);
James Kuszmaul2549e752024-01-20 17:42:51 -080086 drivetrain:frc971.control_loops.drivetrain.fbs.DrivetrainConfig (id: 5);
Niko Sohmers1259b2a2024-01-29 18:00:37 -080087 current_limits:CurrentLimits (id: 6);
Nathan Leongb7a81bf2024-02-03 16:04:17 -080088 transfer_roller_voltages:TransferRollerVoltages (id: 7);
Filip Kujawa37aa0bc2024-01-31 20:59:49 -080089 climber:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 8);
90 climber_set_points:ClimberSetPoints (id: 9);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080091}
92
93table Constants {
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080094 robot:RobotConstants (id: 0);
95 common:Common (id: 1);
Jim Ostrowskicb8b4082024-01-21 02:23:46 -080096 cameras:[CameraConfiguration] (id: 2);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080097}
98
James Kuszmaul2549e752024-01-20 17:42:51 -080099root_type Constants;