mode auto

This commit is contained in:
samuel desharnais
2026-03-24 17:52:09 -04:00
parent a7fb3108ea
commit 7d2b2ea139
18 changed files with 277 additions and 73 deletions

View File

@@ -14,6 +14,7 @@ import com.pathplanner.lib.auto.NamedCommands;
import edu.wpi.first.cameraserver.CameraServer;
import edu.wpi.first.math.MathUtil;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine;
@@ -72,12 +73,9 @@ public class RobotContainer {
public RobotContainer() {
autoChooser = AutoBuilder.buildAutoChooser();
CameraServer.startAutomaticCapture();
configureBindings();
NamedCommands.registerCommand("GrimperMur", new GrimperMur(limeLight3,drivetrain));
NamedCommands.registerCommand("GrimperReservoir", new GrimperReservoir(limeLight3G,drivetrain));
NamedCommands.registerCommand("Lancer", new LancerAuto(lanceur));
NamedCommands.registerCommand("Lancer", new LancerAuto(lanceur, limeLight3G));
NamedCommands.registerCommand("RetourMilieuDroite", new RetourMilieuDroite());
NamedCommands.registerCommand("RetourMilieuGauche", new RetourMilieuGauche());
NamedCommands.registerCommand("Limelighter", new Limelighter(limeLight3G,drivetrain));
@@ -87,6 +85,12 @@ public class RobotContainer {
NamedCommands.registerCommand("TournerA180", new TournerA180(drivetrain));
NamedCommands.registerCommand("MonterGrimpeur", new MonterGrimpeur(grimpeur));
NamedCommands.registerCommand("DescendreGrimpeur", new DescendreGrimpeur(grimpeur));
autoChooser = AutoBuilder.buildAutoChooser();
SmartDashboard.putData("Auto Chooser", autoChooser);
CameraServer.startAutomaticCapture();
configureBindings();
}
private void configureBindings() {
@@ -127,5 +131,6 @@ public class RobotContainer {
public Command getAutonomousCommand() {
return autoChooser.getSelected();
// return getAutonomousCommand();
}
}