public MediumRangeShot() {
addSequential(new UnlockShooter()); // Release shooter piston
// addSequential(new SetShooterSpeed(.9)); // Set shooter wheel PIDs
addSequential(new SetShooterSpeed(.9));
addParallel(new AimParallel());
addSequential(new TurnToGoalWithGyro()); // see TurnToGoalWithGyro()
// addSequential(new WaitCommand(.5));
addSequential(new Aim()); // Ajusts shooter angle based on distance algorithm
addSequential(new MoveBallIntoStorage());
addSequential(new MoveBallIntoShooter()); // Drive feeder roller untill ball leaves
addSequential(new WaitCommand(.25)); // Guarantee ball has left
addSequential(new SetShooterSpeed(0.0)); // Spin down shooter
addSequential(new CancelShot()); // Free up shooting subsystems
addSequential(new DriveWithJoysticks()); // Return control to the driver
}
java类edu.wpi.first.wpilibj.command.WaitCommand的实例源码
MediumRangeShot.java 文件源码
项目:frc-2016
阅读 19
收藏 0
点赞 0
评论 0
EjectBall.java 文件源码
项目:frc-2016
阅读 17
收藏 0
点赞 0
评论 0
public EjectBall() {
addSequential(new RaiseRake());
addParallel(new ReverseRoller());
addSequential(new IntakeMotorReverse());
addSequential(new WaitCommand(1.0)); // maybe change this
addSequential(new StopRoller());
addSequential(new IntakeMotorStop());
}
BackwardMovingShot.java 文件源码
项目:frc-2016
阅读 17
收藏 0
点赞 0
评论 0
public BackwardMovingShot() {
addSequential(new UnlockShooter()); // Release shooter piston
addSequential(new SetShooterSpeed(.9)); // Set shooter wheel PIDs
addParallel(new AimParallel());
addSequential(new TurnToGoalWhileDrivingBackward()); // see TurnToGoalWhileDrivingBackward()
addSequential(new WaitCommand(.5));
addSequential(new Aim()); // Ajusts shooter angle based on distance algorithm
// addSequential(new WaitCommand(.5)); // Waits for shooter to settle
addSequential(new MoveBallIntoShooter()); // Drive feeder roller untill ball leaves
addSequential(new WaitCommand(.25)); // Guarantee ball has left
addSequential(new SetShooterSpeed(0.0)); // Spin down shooter
addSequential(new CancelShot()); // Free up shooting subsystems
addSequential(new DriveWithJoysticks()); // Return control to the driver
}
ForwardMovingShot.java 文件源码
项目:frc-2016
阅读 18
收藏 0
点赞 0
评论 0
public ForwardMovingShot() {
addSequential(new UnlockShooter()); // Release shooter piston
addSequential(new SetShooterSpeed(.9)); // Set shooter wheel PIDs
addParallel(new AimParallel());
addSequential(new TurnToGoalWhileDrivingForward()); // see TurnToGoalWhileDrivingForward()
addSequential(new WaitCommand(.5));
addSequential(new Aim()); // Ajusts shooter angle based on distance algorithm
// addSequential(new WaitCommand(.5)); // Waits for shooter to settle
addSequential(new MoveBallIntoShooter()); // Drive feeder roller untill ball leaves
addSequential(new WaitCommand(.25)); // Guarantee ball has left
addSequential(new SetShooterSpeed(0.0)); // Spin down shooter
addSequential(new CancelShot()); // Free up shooting subsystems
addSequential(new DriveWithJoysticks()); // Return control to the driver
}
BatterShot.java 文件源码
项目:frc-2016
阅读 18
收藏 0
点赞 0
评论 0
public BatterShot() {
addSequential(new DriveDistance(-.4, 26));
addSequential(new UnlockShooter());
addSequential(new LowerRake());
addSequential(new SetShooterSpeed(Preferences.getInstance().getDouble("ShooterSpeed", 0.0)));
addSequential(new AimToAngle(61));
addSequential(new WaitCommand(1.0));
addSequential(new MoveBallIntoShooter());
addSequential(new WaitCommand(1.0));
addSequential(new SetShooterSpeed(0.0));
addSequential(new RaiseRake());
}
ShootIntoGoal.java 文件源码
项目:2016Robot
阅读 17
收藏 0
点赞 0
评论 0
public ShootIntoGoal() {
// Arms down
addSequential(new ArmsDown());
// Aim at goal
addSequential(new ManualShooterAngle(), 0.7);
// Turn to goal
addSequential(new RotateRobotToGoal(), 0.8);
addSequential(new WaitCommand(0.5));
addSequential(new RotateRobotToGoal(), 0.5);
addSequential(new WaitCommand(0.5));
addSequential(new RotateRobotToGoal(), 0.3);
addSequential(new WaitCommand(0.5));
addSequential(new RotateRobotToGoal(), 0.3);
// Aim at goal
addSequential(new SetShooterAngleToGoal(), 0.7);
// // Rev up shooter
// addSequential(new SetShooterToCalculatedSpeed(), 1.5);
//
// // Fire at goal
// addSequential(new ToggleShooterPiston());
// addSequential(new WaitCommand(0.25));
// addSequential(new ToggleShooterPiston());
addSequential(new ShootFullSpeed());
}
LaunchBallCommandGroup.java 文件源码
项目:2016-Stronghold
阅读 15
收藏 0
点赞 0
评论 0
public LaunchBallCommandGroup() {
System.out.println("Launch Ball Command Group");
addSequential(new ActivateLauncherServosCommand());
addSequential(new WaitCommand(1));
addSequential(new RetractLauncherServosCommand());
addSequential(new StopWheelsCommand());
}
ChevalDeFrise.java 文件源码
项目:2016-Robot-Code
阅读 18
收藏 0
点赞 0
评论 0
public ChevalDeFrise(IntakeSide intakeSide) {
addSequential(new SetVerticalIntake(80, intakeSide));
addParallel(new AssistedDrive(AssistedTranslateType.ENCODER, AssistedRotateType.ENCODER, 24, 0, 12));
addSequential(new WaitCommand(1));
addParallel(new SetVerticalIntake(20, intakeSide)); // Slowly lift arm as robot moves across
addParallel(new AssistedDrive(AssistedTranslateType.ENCODER, AssistedRotateType.ENCODER, 12, 0, 12));
}
GiveBallToShooter.java 文件源码
项目:2016-Robot-Code
阅读 17
收藏 0
点赞 0
评论 0
public GiveBallToShooter(IntakeSide intakeSide) {
if (intakeSide == IntakeSide.FRONT) {
addParallel(new MoveTurnTable(0));
} else {
addParallel(new MoveTurnTable(180));
}
//addParallel(new MoveTurnTable((intakeSide == IntakeSide.FRONT) ? 180 : 0));
addSequential(new MoveHood(25));
addSequential(new SetVerticalIntake(20, intakeSide));
addSequential(new SpinIntake(Direction.FORWARD, 1, IntakeSide.FRONT));
//addSequential(new CheckIntakeBreakBeam(intakeSide, true, true, 0));
addSequential(new WaitCommand(1));
addSequential(new MoveHood(Robot.hood.HOOD_MIN)); // Forward would be positive degrees. This command traps the ball
}
CalibrateVisionAngle.java 文件源码
项目:2016-Robot-Code
阅读 19
收藏 0
点赞 0
评论 0
public CalibrateVisionAngle() {
addSequential(new MoveTurnTable(Robot.turntable.CALIBRATION_START));
for (double currentAngle = Robot.turntable.CALIBRATION_START; currentAngle < -Robot.turntable.CALIBRATION_START; currentAngle += Robot.turntable.CALIBRATION_INCREMENT) {
addSequential(new MoveTurnTable(currentAngle));
addSequential(new WaitCommand(0.5));
addSequential(new CompareVisionAngle());
}
}