|
6 | 6 | package frc.trigon.robot;
|
7 | 7 |
|
8 | 8 | import com.pathplanner.lib.auto.AutoBuilder;
|
9 |
| -import edu.wpi.first.math.geometry.Pose3d; |
10 | 9 | import edu.wpi.first.wpilibj2.command.Command;
|
11 | 10 | import edu.wpi.first.wpilibj2.command.Commands;
|
12 | 11 | import edu.wpi.first.wpilibj2.command.InstantCommand;
|
13 | 12 | import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine;
|
14 | 13 | import frc.trigon.robot.commands.CommandConstants;
|
15 | 14 | import frc.trigon.robot.commands.commandfactories.*;
|
| 15 | +import frc.trigon.robot.constants.AutonomousConstants; |
16 | 16 | import frc.trigon.robot.constants.CameraConstants;
|
17 | 17 | import frc.trigon.robot.constants.LEDConstants;
|
18 | 18 | import frc.trigon.robot.constants.OperatorConstants;
|
19 |
| -import frc.trigon.robot.constants.PathPlannerConstants; |
20 | 19 | import frc.trigon.robot.misc.objectdetectioncamera.ObjectPoseEstimator;
|
21 | 20 | import frc.trigon.robot.misc.simulatedfield.SimulatedGamePieceConstants;
|
22 | 21 | import frc.trigon.robot.misc.simulatedfield.SimulationFieldHandler;
|
23 | 22 | import frc.trigon.robot.poseestimation.poseestimator.PoseEstimator;
|
24 | 23 | import frc.trigon.robot.subsystems.MotorSubsystem;
|
25 | 24 | import frc.trigon.robot.subsystems.armelevator.ArmElevator;
|
26 | 25 | import frc.trigon.robot.subsystems.armelevator.ArmElevatorCommands;
|
| 26 | +import frc.trigon.robot.subsystems.armelevator.ArmElevatorConstants; |
27 | 27 | import frc.trigon.robot.subsystems.climber.Climber;
|
28 | 28 | import frc.trigon.robot.subsystems.climber.ClimberCommands;
|
29 | 29 | import frc.trigon.robot.subsystems.climber.ClimberConstants;
|
@@ -92,21 +92,25 @@ private void bindDefaultCommands() {
|
92 | 92 | private void initializeGeneralSystems() {
|
93 | 93 | Flippable.init();
|
94 | 94 | LEDConstants.init();
|
95 |
| - PathPlannerConstants.init(); |
| 95 | + AutonomousConstants.init(); |
96 | 96 | }
|
97 | 97 |
|
98 | 98 | private void bindControllerCommands() {
|
99 | 99 | OperatorConstants.RESET_HEADING_TRIGGER.onTrue(CommandConstants.RESET_HEADING_COMMAND);
|
100 |
| - OperatorConstants.DRIVE_FROM_DPAD_TRIGGER.whileTrue(CommandConstants.SELF_RELATIVE_DRIVE_FROM_DPAD_COMMAND); |
| 100 | +// OperatorConstants.DRIVE_FROM_DPAD_TRIGGER.whileTrue(CommandConstants.SELF_RELATIVE_DRIVE_FROM_DPAD_COMMAND); |
101 | 101 | OperatorConstants.TOGGLE_BRAKE_TRIGGER.onTrue(GeneralCommands.getToggleBrakeCommand());
|
102 | 102 |
|
103 |
| - OperatorConstants.SPAWN_CORAL_TRIGGER.onTrue(new InstantCommand(() -> SimulationFieldHandler.updateCoralSpawning(new Pose3d(ROBOT_POSE_ESTIMATOR.getEstimatedRobotPose())))); |
104 |
| - OperatorConstants.CORAL_COLLECTION_TRIGGER.whileTrue(CoralCollectionCommands.getCoralCollectionCommand()); |
| 103 | + OperatorConstants.FLOOR_ALGAE_COLLECTION_TRIGGER.toggleOnTrue(AlgaeManipulationCommands.getFloorAlgaeCollectionCommand()); |
| 104 | + OperatorConstants.REEF_ALGAE_COLLECTION_TRIGGER.toggleOnTrue(AlgaeManipulationCommands.getReefAlgaeCollectionCommand()); |
105 | 105 |
|
106 |
| - OperatorConstants.EJECT_CORAL_TRIGGER.whileTrue(CoralEjectionCommands.getCoralEjectionCommand()); |
| 106 | + OperatorConstants.CORAL_COLLECTION_TRIGGER.whileTrue(CoralCollectionCommands.getCoralCollectionCommand()); |
107 | 107 | OperatorConstants.SCORE_CORAL_LEFT_TRIGGER.whileTrue(CoralPlacingCommands.getScoreInReefCommand(false));
|
108 | 108 | OperatorConstants.SCORE_CORAL_RIGHT_TRIGGER.whileTrue(CoralPlacingCommands.getScoreInReefCommand(true));
|
| 109 | + OperatorConstants.EJECT_CORAL_TRIGGER.whileTrue(CoralEjectionCommands.getCoralEjectionCommand()); |
109 | 110 |
|
| 111 | + OperatorConstants.SPAWN_CORAL_IN_SIMULATION_TRIGGER.onTrue(new InstantCommand(() -> SimulationFieldHandler.updateCoralSpawning(ROBOT_POSE_ESTIMATOR.getEstimatedRobotPose()))); |
| 112 | + OperatorConstants.FLIP_ARM_TRIGGER.onTrue(new InstantCommand(() -> OperatorConstants.SHOULD_FLIP_ARM_OVERRIDE = !OperatorConstants.SHOULD_FLIP_ARM_OVERRIDE)); |
| 113 | + OperatorConstants.LOLLIPOP_ALGAE_TOGGLE_TRIGGER.onTrue(new InstantCommand(AlgaeManipulationCommands::toggleLollipopCollection)); |
110 | 114 | OperatorConstants.CLIMB_TRIGGER.toggleOnTrue(ClimbCommands.getClimbCommand());
|
111 | 115 | }
|
112 | 116 |
|
|
0 commit comments