| include "frc971/vision/calibration.fbs"; |
| include "frc971/vision/target_map.fbs"; |
| include "frc971/control_loops/profiled_subsystem.fbs"; |
| include "frc971/zeroing/constants.fbs"; |
| include "frc971/math/matrix.fbs"; |
| include "frc971/control_loops/drivetrain/drivetrain_config.fbs"; |
| |
| namespace y2024; |
| |
| table CameraConfiguration { |
| calibration:frc971.vision.calibration.CameraCalibration (id: 0); |
| } |
| |
| table ShotParams { |
| shot_velocity: double (id: 0); |
| |
| // Angle of the altitude |
| shot_altitude_angle: double (id: 1); |
| |
| // Angle of the catapult |
| shot_catapult_angle: double (id: 2); |
| |
| // Speed over ground to use for shooting on the fly |
| shot_speed_over_ground: double (id: 3); |
| } |
| |
| table InterpolationTablePoint { |
| distance_from_goal: double (id: 0); |
| shot_params: ShotParams (id: 1); |
| } |
| |
| // Amount of voltage to give to the intake rollers when: |
| // spitting, which represents voltage when IntakeRollerGoal is SPITTING |
| // and intaking, which represents voltage when IntakeRollerGoal is INTAKING |
| table IntakeRollerVoltages { |
| spitting:double (id: 0); |
| intaking:double (id: 1); |
| } |
| |
| // Set points for the pivot in radians when: |
| // extended, which represents radians for when IntakePivotGoal is EXTENDED |
| // and retracted, which represents radians for when IntakePivotGoal is RETRACTED or NONE |
| table IntakePivotSetPoints { |
| extended:double (id: 0); |
| retracted:double (id: 1); |
| } |
| |
| // Set points for the climber in meters when: |
| // fully extended, which represents meters for when ClimberGoal is FULL_EXTEND |
| // partially extended, which represents meters for when ClimberGoal is HALF_EXTEND |
| // and retracted, which represents meters for when ClimberGoal is RETRACT |
| table ClimberSetPoints { |
| full_extend:double (id: 0); |
| stowed:double (id: 1); |
| retract:double (id: 2); |
| } |
| |
| table PotAndAbsEncoderConstants { |
| zeroing_constants:frc971.zeroing.PotAndAbsoluteEncoderZeroingConstants (id: 0); |
| potentiometer_offset:double (id: 1); |
| } |
| |
| // Stores current limits for motors |
| table CurrentLimits { |
| intake_pivot_supply_current_limit:double (id: 0); |
| intake_pivot_stator_current_limit:double (id: 1); |
| intake_roller_supply_current_limit:double (id: 2); |
| intake_roller_stator_current_limit:double (id: 3); |
| transfer_roller_supply_current_limit:double (id: 4); |
| transfer_roller_stator_current_limit:double (id: 5); |
| drivetrain_supply_current_limit:double (id: 6); |
| drivetrain_stator_current_limit:double (id: 7); |
| climber_supply_current_limit:double (id: 8); |
| climber_stator_current_limit:double (id: 9); |
| extend_supply_current_limit:double (id: 10); |
| extend_stator_current_limit:double (id: 11); |
| extend_roller_supply_current_limit:double (id: 12); |
| extend_roller_stator_current_limit:double (id: 13); |
| turret_supply_current_limit:double (id: 14); |
| turret_stator_current_limit:double (id: 15); |
| altitude_supply_current_limit:double (id: 16); |
| altitude_stator_current_limit:double (id: 17); |
| retention_roller_supply_current_limit:double (id: 18); |
| retention_roller_stator_current_limit:double (id: 19); |
| slower_retention_roller_stator_current_limit:double (id: 20); |
| shooting_retention_roller_stator_current_limit:double (id: 23); |
| catapult_supply_current_limit:double (id: 21); |
| catapult_stator_current_limit:double (id: 22); |
| } |
| |
| table TransferRollerVoltages { |
| // Voltage to apply while intaking the game piece. |
| transfer_in:double (id: 0); |
| // Voltage to apply while spitting the game piece. |
| transfer_out:double (id: 1); |
| // Voltage to apply while the extend is moving and dragging the |
| // game piece out of the rollers. |
| extend_moving:double (id: 2); |
| } |
| |
| table ExtendRollerVoltages { |
| scoring:double (id: 0); |
| reversing:double (id: 1); |
| } |
| |
| // Extend positions |
| table ExtendSetPoints { |
| // The position which lets us score on the trap. |
| trap:double (id: 0); |
| // The position which lets us score on the amp. |
| amp:double (id: 1); |
| // The position which lets us transfer into the catapult. |
| catapult:double (id: 2); |
| // The position near 0 where we are ready to intake a note. |
| retracted:double (id: 3); |
| } |
| |
| enum AutonomousMode : ubyte { |
| NONE = 0, |
| // Simple test S-spline auto mode |
| SPLINE_AUTO = 1, |
| // Simple drive-and-shoot to pick up at most one game piece. |
| MOBILITY_AND_SHOOT = 2, |
| // Auto to pick up four game pieces. |
| FOUR_PIECE = 3, |
| // Auto which picks up two game pieces from the center |
| TWO_PIECE_STEAL = 4, |
| } |
| |
| table RobotConstants { |
| intake_constants:frc971.zeroing.AbsoluteEncoderZeroingConstants (id: 0); |
| // Deprecated since climber no longer has an encoder |
| climber_constants:PotAndAbsEncoderConstants (id: 1, deprecated); |
| climber_potentiometer_offset:double (id: 8); |
| catapult_constants:PotAndAbsEncoderConstants (id: 2); |
| altitude_constants:PotAndAbsEncoderConstants (id: 3); |
| turret_constants:PotAndAbsEncoderConstants (id: 4); |
| extend_constants:PotAndAbsEncoderConstants (id: 5); |
| disable_extend:bool (id: 6); |
| disable_climber:bool (id: 7); |
| } |
| |
| table ShooterSetPoint { |
| turret_position: double (id: 0); |
| altitude_position: double (id: 1); |
| shot_velocity:double (id: 2); |
| } |
| |
| table Pose { |
| // Pos is a 3x1 matrix which contains the (x, y, z) component of the Pose. |
| pos: frc971.fbs.Matrix (id: 0); |
| theta: double (id: 1); |
| } |
| |
| table ShooterTargets { |
| // The Pose of the red and blue alliance speakers we are aiming at. |
| red_alliance: Pose (id: 0); |
| blue_alliance: Pose (id: 1); |
| } |
| |
| table RetentionRollerVoltages { |
| retaining:double (id: 0); |
| spitting:double (id: 1); |
| } |
| |
| // Set of april tag targets, by april tag ID, to ignore when on a |
| // given alliance. |
| table IgnoreTargets { |
| red:[uint64] (id: 0); |
| blue:[uint64] (id: 1); |
| } |
| |
| // Common table for constants unrelated to the robot |
| table Common { |
| target_map:frc971.vision.TargetMap (id: 0); |
| shooter_interpolation_table: [InterpolationTablePoint] (id: 1); |
| intake_roller_voltages:IntakeRollerVoltages (id : 2); |
| intake_pivot_set_points:IntakePivotSetPoints (id: 3); |
| intake_pivot:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 4); |
| drivetrain:frc971.control_loops.drivetrain.fbs.DrivetrainConfig (id: 5); |
| current_limits:CurrentLimits (id: 6); |
| transfer_roller_voltages:TransferRollerVoltages (id: 7); |
| climber:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 8, deprecated); |
| climber_set_points:ClimberSetPoints (id: 9, deprecated); |
| turret_loading_position: double (id: 10); |
| catapult_return_position: double (id: 11); |
| catapult:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 12); |
| altitude:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 13); |
| turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 14); |
| extend:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 15); |
| extend_roller_voltages:ExtendRollerVoltages (id: 16); |
| shooter_targets:ShooterTargets (id: 17); |
| altitude_loading_position: double (id: 18); |
| retention_roller_voltages:RetentionRollerVoltages (id: 19); |
| min_altitude_shooting_angle: double (id: 20); |
| max_altitude_shooting_angle: double (id: 25); |
| shooter_speaker_set_point: ShooterSetPoint (id: 21); |
| shooter_podium_set_point: ShooterSetPoint (id: 22); |
| extend_set_points:ExtendSetPoints (id: 23); |
| // The position to move the turret to when avoiding collision |
| // with the extend when the extend is moving to amp/trap position. |
| turret_avoid_extend_collision_position: double (id: 24); |
| altitude_avoid_extend_collision_position: double (id: 28); |
| autonomous_mode:AutonomousMode (id: 26); |
| ignore_targets:IgnoreTargets (id: 27); |
| } |
| |
| table Constants { |
| cameras:[CameraConfiguration] (id: 0); |
| robot:RobotConstants (id: 1); |
| common:Common (id: 2); |
| } |
| |
| root_type Constants; |