This commit is contained in:
samuel desharnais
2024-02-15 18:25:45 -05:00
parent 08d101b8ca
commit a862197b73
7 changed files with 158 additions and 34 deletions

View File

@ -83,7 +83,7 @@ public class RobotContainer {
joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur));
joystick.button(4).whileTrue(new ParallelCommandGroup(new Lancer(lanceur,limelight),new Limelight_tracker(limelight,drive)));
joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive),new GuiderHaut(guideur)));
// deplacement
configureBindings();
drive.setDefaultCommand(new RunCommand(()->{

View File

@ -36,7 +36,6 @@ public class GrimpeurGauche extends Command {
}
else if(grimpeur.getpitch()<-15){
grimpeur.gauche(doubleSupplier.getAsDouble());
}
else if(grimpeur.getpitch()>15){
grimpeur.gauche(-doubleSupplier.getAsDouble());

View File

@ -31,11 +31,17 @@ public class LancerNote extends Command {
if(lancer.vitesse(vitesse)>vitesse){
accumulateur.Accumuler(0.6);
}
else{
accumulateur.Accumuler(0);
}
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {}
public void end(boolean interrupted) {
lancer.vitesse(0);
accumulateur.Accumuler(0);
}
// Returns true when the command should end.
@Override

View File

@ -38,7 +38,7 @@ public class Drive extends SubsystemBase {
e.printStackTrace();
}
AutoBuilder.configureHolonomic(swerveDrive::getPose, swerveDrive::resetOdometry, swerveDrive::getRobotVelocity, swerveDrive::setChassisSpeeds, new HolonomicPathFollowerConfig(
new PIDConstants(5,0,0), new PIDConstants(5,0,0), 4.5,
new PIDConstants(5,0,0), new PIDConstants(5,0,0), 15,
0.275,
new ReplanningConfig()
), ()->{