two and three peice from left sub works
This commit is contained in:
@@ -28,4 +28,5 @@ public class autoIntaking extends Command{
|
||||
return true;
|
||||
}else {return false;}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.PrintCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
||||
import edu.wpi.first.wpilibj2.command.button.Trigger;
|
||||
@@ -101,9 +102,40 @@ public class RobotContainer {
|
||||
|
||||
climber = new Climber(shooter::getShooterAngle);
|
||||
|
||||
NamedCommands.registerCommand("Charge Shooter 2 Sec", shooter.angleSpeedsSetpoints(() -> ShooterConstants.kShooterLoadAngle, 1.0, 1.0).withTimeout(2.0));
|
||||
NamedCommands.registerCommand("Speaker Note Shot", Commands.parallel(shooter.angleSpeedsSetpoints(() -> ShooterConstants.kShooterLoadAngle, 1.0, 1.0), indexer.shootNote(() -> 1.0)).withTimeout(2.0));
|
||||
NamedCommands.registerCommand("Auto Intake", new autoIntaking(intake, indexer::getBeamBreak).andThen(intake.intakeUpCommand()));
|
||||
NamedCommands.registerCommand(
|
||||
"Charge Shooter 2 Sec",
|
||||
shooter.angleSpeedsSetpoints(
|
||||
() -> ShooterConstants.kShooterLoadAngle,
|
||||
1.0,
|
||||
1.0
|
||||
).withTimeout(2.0)
|
||||
);
|
||||
|
||||
NamedCommands.registerCommand(
|
||||
"Speaker Note Shot",
|
||||
Commands.parallel(
|
||||
shooter.angleSpeedsSetpoints(
|
||||
() -> ShooterConstants.kShooterLoadAngle,
|
||||
1.0,
|
||||
1.0
|
||||
),
|
||||
indexer.shootNote(() -> 1.0)
|
||||
).withTimeout(2.0)
|
||||
);
|
||||
|
||||
|
||||
NamedCommands.registerCommand(
|
||||
"Auto Intake",
|
||||
Commands.parallel(
|
||||
intake.intakeControl(
|
||||
() -> IntakeConstants.kDownAngle,
|
||||
() -> 1.0
|
||||
),
|
||||
indexer.advanceNote()
|
||||
).withTimeout(3.0)//.until(indexer::getBeamBreak)
|
||||
);
|
||||
|
||||
//NamedCommands.registerCommand("Auto Intake", new PrintCommand("Intake Note"));
|
||||
|
||||
// An example Named Command, doesn't need to remain once we start actually adding real things
|
||||
// ALL Named Commands need to be defined AFTER subsystem initialization and BEFORE auto/controller configuration
|
||||
@@ -186,7 +218,7 @@ public class RobotContainer {
|
||||
)
|
||||
);
|
||||
|
||||
driver.leftTrigger().onFalse(
|
||||
driver.leftTrigger().whileFalse(
|
||||
new InstantCommand(
|
||||
() -> {
|
||||
intakeDown = false;
|
||||
@@ -194,7 +226,7 @@ public class RobotContainer {
|
||||
)
|
||||
);
|
||||
|
||||
driver.leftTrigger().onTrue(Commands.parallel(
|
||||
driver.leftTrigger().whileTrue(Commands.parallel(
|
||||
new InstantCommand(
|
||||
() -> {
|
||||
intakeDown = true;
|
||||
|
||||
@@ -13,9 +13,9 @@ public final class AutoConstants {
|
||||
public static final double kMaxAngularSpeedRadiansPerSecond = Math.PI;
|
||||
public static final double kMaxAngularSpeedRadiansPerSecondSquared = Math.PI;
|
||||
|
||||
public static final double kPXController = 1.05;//5;
|
||||
public static final double kPYController = 1.05;//5;
|
||||
public static final double kPThetaController = 0.95;//0.5; // needs to be separate from heading control
|
||||
public static final double kPXController = 5.5;//5;
|
||||
public static final double kPYController = 5.5;//5;
|
||||
public static final double kPThetaController = 5;//0.5; // needs to be separate from heading control
|
||||
|
||||
public static final double kPHeadingController = 0.02; // for heading control NOT PATHING
|
||||
public static final double kDHeadingController = 0.0025;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class IntakeConstants {
|
||||
public static final double kGFeedForward = 1;//1.11;
|
||||
public static final double kVFeedForward = .5;//0.73;
|
||||
|
||||
public static final double kStartingAngle = Math.toRadians(105.0);
|
||||
public static final double kStartingAngle = Math.toRadians(95.0);
|
||||
public static final double kUpAngle = Math.toRadians(90.0);
|
||||
public static final double kDownAngle = Math.toRadians(-34.0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user