Jim Ostrowski | cb8b408 | 2024-01-21 02:23:46 -0800 | [diff] [blame] | 1 | include "frc971/vision/calibration.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 2 | include "frc971/vision/target_map.fbs"; |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 3 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 4 | include "frc971/zeroing/constants.fbs"; |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 5 | include "frc971/control_loops/drivetrain/drivetrain_config.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 6 | |
| 7 | namespace y2024; |
| 8 | |
Jim Ostrowski | cb8b408 | 2024-01-21 02:23:46 -0800 | [diff] [blame] | 9 | table CameraConfiguration { |
| 10 | calibration:frc971.vision.calibration.CameraCalibration (id: 0); |
| 11 | } |
| 12 | |
Maxwell Henderson | 93f37f2 | 2024-01-19 17:08:23 -0800 | [diff] [blame] | 13 | table ShotParams { |
| 14 | shot_velocity: double (id: 0); |
| 15 | shot_angle: double (id: 1); |
| 16 | } |
| 17 | |
| 18 | table InterpolationTablePoint { |
| 19 | distance_from_goal: double (id: 0); |
| 20 | shot_params: ShotParams (id: 1); |
| 21 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 22 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 23 | // Amount of voltage to give to the intake rollers when: |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 24 | // spitting, which represents voltage when IntakeRollerGoal is SPITTING |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 25 | // and intaking, which represents voltage when IntakeRollerGoal is INTAKING |
| 26 | table IntakeRollerVoltages { |
| 27 | spitting:double (id: 0); |
| 28 | intaking:double (id: 1); |
| 29 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 30 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 31 | // 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 |
| 34 | table IntakePivotSetPoints { |
| 35 | extended:double (id: 0); |
| 36 | retracted:double (id: 1); |
| 37 | } |
| 38 | |
Filip Kujawa | 37aa0bc | 2024-01-31 20:59:49 -0800 | [diff] [blame] | 39 | // 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 |
| 43 | table ClimberSetPoints { |
| 44 | full_extend:double (id: 0); |
| 45 | half_extend:double (id: 1); |
| 46 | retract:double (id: 2); |
| 47 | } |
| 48 | |
| 49 | table PotAndAbsEncoderConstants { |
| 50 | zeroing_constants:frc971.zeroing.PotAndAbsoluteEncoderZeroingConstants (id: 0); |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 51 | potentiometer_offset:double (id: 1); |
| 52 | } |
| 53 | |
Niko Sohmers | 1259b2a | 2024-01-29 18:00:37 -0800 | [diff] [blame] | 54 | // Stores current limits for motors |
| 55 | table 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 Sohmers | ed7ffc4 | 2024-02-03 16:05:19 -0800 | [diff] [blame] | 60 | transfer_roller_supply_current_limit:double (id: 4); |
| 61 | transfer_roller_stator_current_limit:double (id: 5); |
Maxwell Henderson | fb3bfea | 2024-02-03 19:24:46 -0800 | [diff] [blame] | 62 | drivetrain_supply_current_limit:double (id: 6); |
| 63 | drivetrain_stator_current_limit:double (id: 7); |
Niko Sohmers | 1259b2a | 2024-01-29 18:00:37 -0800 | [diff] [blame] | 64 | } |
| 65 | |
Nathan Leong | b7a81bf | 2024-02-03 16:04:17 -0800 | [diff] [blame] | 66 | table TransferRollerVoltages { |
| 67 | transfer_in:double (id: 0); |
| 68 | transfer_out:double (id: 1); |
| 69 | } |
| 70 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 71 | table RobotConstants { |
Filip Kujawa | 37aa0bc | 2024-01-31 20:59:49 -0800 | [diff] [blame] | 72 | intake_constants:PotAndAbsEncoderConstants (id: 0); |
| 73 | climber_constants:PotAndAbsEncoderConstants (id: 1); |
| 74 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | // Common table for constants unrelated to the robot |
| 78 | table Common { |
| 79 | target_map:frc971.vision.TargetMap (id: 0); |
| 80 | shooter_interpolation_table: [InterpolationTablePoint] (id: 1); |
| 81 | intake_roller_voltages:IntakeRollerVoltages (id : 2); |
| 82 | intake_pivot_set_points:IntakePivotSetPoints (id: 3); |
| 83 | intake_pivot:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 4); |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 84 | drivetrain:frc971.control_loops.drivetrain.fbs.DrivetrainConfig (id: 5); |
Niko Sohmers | 1259b2a | 2024-01-29 18:00:37 -0800 | [diff] [blame] | 85 | current_limits:CurrentLimits (id: 6); |
Nathan Leong | b7a81bf | 2024-02-03 16:04:17 -0800 | [diff] [blame] | 86 | transfer_roller_voltages:TransferRollerVoltages (id: 7); |
Filip Kujawa | 37aa0bc | 2024-01-31 20:59:49 -0800 | [diff] [blame] | 87 | climber:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 8); |
| 88 | climber_set_points:ClimberSetPoints (id: 9); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | table Constants { |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 92 | robot:RobotConstants (id: 0); |
| 93 | common:Common (id: 1); |
Jim Ostrowski | cb8b408 | 2024-01-21 02:23:46 -0800 | [diff] [blame] | 94 | cameras:[CameraConfiguration] (id: 2); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 95 | } |
| 96 | |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 97 | root_type Constants; |