public Shoot1BallBackAutonomousHot() {
addSequential(new TransmissionShift(Transmission.LO_GEAR));
addParallel(new ChassisMove(Chassis.MOVE_AUTON_BACK_LONG_DISTANCE, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_REVERSE_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new WaitOnCheesyVision(5));
addSequential(new WingsSetPosition(PneumaticSubsystem.EXTEND));
addSequential(new WaitTimer(0.1));
addSequential(new WinchFire());
addParallel(new WingsSetPosition(PneumaticSubsystem.RETRACT));
addParallel(new WinchSetPositionLongShot(Winch.WINCH_DISTANCE_LONG_SHOT, 1.0));
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_UP));
}
java类edu.wpi.first.wpilibj.command.WaitForChildren的实例源码
Shoot1BallBackAutonomousHot.java 文件源码
项目:Team3310FRC2014
阅读 20
收藏 0
点赞 0
评论 0
DriveAndShoot2Ball.java 文件源码
项目:Storm2014
阅读 21
收藏 0
点赞 0
评论 0
public DriveAndShoot2Ball() {
addSequential(new Shift(true));
addSequential(new SetLatched(true));
addSequential(new SetArmPosition(2,false));
addParallel(new SpinRoller((float) -0.6));
addSequential(new WaitCommand(0.3));
addParallel(_waitAndLetRoll());
addSequential(new DriveForward(1, 4200));
addSequential(new WaitCommand(1.0));
addSequential(new WaitForChildren());
// addSequential(new );
addSequential(new Launch());
addParallel(_waitAndIntake());
addSequential(new Reset());
addParallel(new PreFire());
addSequential(new WaitCommand(0.5));
addSequential(new SpinRoller(0));
addSequential(new SetArmPosition(0, false));
addSequential(new WaitCommand(0.5));
addSequential(new SetArmPosition(2, false));
addSequential(new WaitCommand(1.0));
addSequential(new Launch());
addSequential(new Reset());
}
Shoot1BallBackAutonomous.java 文件源码
项目:Team3310FRC2014
阅读 23
收藏 0
点赞 0
评论 0
public Shoot1BallBackAutonomous() {
addSequential(new TransmissionShift(Transmission.LO_GEAR));
addParallel(new ChassisMove(Chassis.MOVE_AUTON_BACK_LONG_DISTANCE, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_REVERSE_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new WingsSetPosition(PneumaticSubsystem.EXTEND));
addSequential(new WaitTimer(0.1));
addSequential(new WinchFire());
addParallel(new WingsSetPosition(PneumaticSubsystem.RETRACT));
addParallel(new WinchSetPositionLongShot(Winch.WINCH_DISTANCE_LONG_SHOT, 1.0));
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_UP));
}
Shoot1BallShortAutonomousHot.java 文件源码
项目:Team3310FRC2014
阅读 24
收藏 0
点赞 0
评论 0
public Shoot1BallShortAutonomousHot() {
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_FORWARD_SHORT_SHOT));
addParallel(new ChassisMove(158, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new WaitForChildren());
addSequential(new WaitOnCheesyVision(3));
addParallel(new ShootSequence(Winch.WINCH_DISTANCE_SHORT_SHOT));
addSequential(new ChassisMoveForTime(1.0, -0.5));
}
Shoot2BallAutonomous.java 文件源码
项目:Team3310FRC2014
阅读 20
收藏 0
点赞 0
评论 0
public Shoot2BallAutonomous() {
addSequential(new TransmissionShift(Transmission.LO_GEAR));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_FORWARD_AUTO_HOLD));
addSequential(new ChassisMove(Chassis.MOVE_AUTON_FORWARD_LONG_DISTANCE, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_LONG_SHOT));
addSequential(new IntakeSetArmPosition(PneumaticSubsystem.EXTEND));
addSequential(new WingsSetPosition(PneumaticSubsystem.EXTEND));
addSequential(new WaitTimer(0.1));
addSequential(new WinchFire());
addParallel(new WinchSetPositionLongShot(Winch.WINCH_DISTANCE_LONG_SHOT, 1.0));
addSequential(new IntakeSetArmPosition(PneumaticSubsystem.RETRACT));
addSequential(new ChassisMove(-25, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_FORWARD_INTAKE));
addSequential(new WaitForChildren());
addParallel(new IntakeLoadBall());
addSequential(new ChassisMove(40, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new WaitForChildren());
addParallel(new ChassisMove(-15, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new IntakeOnTimed(0.2, Intake.INTAKE_ROLLER_SPEED_BALL_PICKUP));
addSequential(new IntakeSetArmPosition(PneumaticSubsystem.EXTEND));
addSequential(new WingsSetPosition(PneumaticSubsystem.EXTEND));
addSequential(new WaitTimer(0.1));
addSequential(new WinchFire());
addSequential(new IntakeSetArmPosition(PneumaticSubsystem.RETRACT));
addParallel(new WingsSetPosition(PneumaticSubsystem.RETRACT));
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_UP));
addParallel(new TransmissionShift(Transmission.HI_GEAR));
}
Shoot1BallAutonomous.java 文件源码
项目:Team3310FRC2014
阅读 18
收藏 0
点赞 0
评论 0
public Shoot1BallAutonomous() {
addSequential(new TransmissionShift(Transmission.LO_GEAR));
addParallel(new ChassisMove(Chassis.MOVE_AUTON_FORWARD_LONG_DISTANCE, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new WaitCommand(1));
addSequential(new ShootSequence(Winch.WINCH_DISTANCE_LONG_SHOT));
}
Shoot1BallAutonomousHot.java 文件源码
项目:Team3310FRC2014
阅读 17
收藏 0
点赞 0
评论 0
public Shoot1BallAutonomousHot() {
addSequential(new TransmissionShift(Transmission.LO_GEAR));
addParallel(new ChassisMove(Chassis.MOVE_AUTON_FORWARD_LONG_DISTANCE, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new WaitOnCheesyVision(5));
addSequential(new ShootSequence(Winch.WINCH_DISTANCE_LONG_SHOT));
}
Shoot1BallShortAutonomous.java 文件源码
项目:Team3310FRC2014
阅读 18
收藏 0
点赞 0
评论 0
public Shoot1BallShortAutonomous() {
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_FORWARD_SHORT_SHOT));
addParallel(new ChassisMove(158, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new WaitForChildren());
addSequential(new ChassisMoveForTime(1.0, -0.5));
addSequential(new ShootSequence(Winch.WINCH_DISTANCE_SHORT_SHOT));
}
Shoot2BallBackAutonomous.java 文件源码
项目:Team3310FRC2014
阅读 18
收藏 0
点赞 0
评论 0
public Shoot2BallBackAutonomous() {
addSequential(new TransmissionShift(Transmission.HI_GEAR));
addParallel(new ChassisMove(Chassis.MOVE_AUTON_BACK_LONG_DISTANCE, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_REVERSE_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new WingsSetPosition(PneumaticSubsystem.EXTEND));
addSequential(new WaitTimer(0.1));
addSequential(new WinchFire());
addParallel(new WinchSetPositionLongShot(Winch.WINCH_DISTANCE_LONG_SHOT, 1.0));
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_FORWARD_INTAKE));
addSequential(new ChassisMove(60, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new WaitForChildren());
addParallel(new IntakeLoadBall());
addSequential(new ChassisMove(40, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new WaitForChildren());
addParallel(new ChassisMove(-95, Chassis.MOVE_AUTON_SPEED, true));
addSequential(new PivotSetAngle(Pivot.PIVOT_POSITION_REVERSE_LONG_SHOT));
addSequential(new WaitForChildren());
addSequential(new IntakeOnTimed(0.3, Intake.INTAKE_ROLLER_SPEED_BALL_PICKUP));
addSequential(new WingsSetPosition(PneumaticSubsystem.EXTEND));
addSequential(new WaitTimer(1.0));
addSequential(new WinchFire());
addParallel(new WingsSetPosition(PneumaticSubsystem.RETRACT));
addParallel(new PivotSetAngle(Pivot.PIVOT_POSITION_UP));
addParallel(new TransmissionShift(Transmission.HI_GEAR));
}
Center_RotDrvFwdHotGoal_1Ball.java 文件源码
项目:2014_Main_Robot
阅读 25
收藏 0
点赞 0
评论 0
public Center_RotDrvFwdHotGoal_1Ball(double firstHotGoalTimeOut) {
// wait for hot goal, assume camera is facing right hot goal
addParallel(new TusksLongShotPosition());
addParallel(new IntakeDown());
addSequential(new WaitForFirstHot(), firstHotGoalTimeOut);
// lets see if this works
addSequential(new WaitForChildren());
// Rotate DriveTrain based on angle from camera. Drive to the goal the
// camera thinks is NOT hot, since it will take more than 5sec to get
// to position to fire the ball.
addSequential(new RotateDrivetrainRelative(0.0, true, true));
//addSequential(new Sleep(), 1.0);
// Drive forward to inscrease likelyhood of shoot and gain 5 pts, should run 55 inches forward
// addSequential(new AutoDriveXDistance(RobotMap.autoDriveDistance.getDouble()));
//Let the ball settle before a shot
addSequential(new Sleep(), 2.0);
// fire
addSequential(new FireAndReload());
addSequential(new AutoDriveXDistance(RobotMap.autoDriveDistance.getDouble()));
}
Zed.java 文件源码
项目:Zed-Java
阅读 24
收藏 0
点赞 0
评论 0
/**
* This function is called once at the start of autonomous mode.
*/
public void autonomousInit(){
DriverStation driverStation = DriverStation.getInstance();
double delayTime = driverStation.getAnalogIn(1);
boolean trackHighGoal = driverStation.getDigitalIn(1);
boolean trackMiddleGoal = driverStation.getDigitalIn(2);
boolean shootInAuto = true;
betweenModes();
DrivetrainStrafe drivetrainStrafe = Components.getInstance().drivetrainStrafe;
drivetrainStrafe.setDefaultCommand(new MaintainStateCommand(drivetrainStrafe));
DrivetrainRotation drivetrainRotation = Components.getInstance().drivetrainRotation;
drivetrainRotation.setDefaultCommand(new MaintainStateCommand(drivetrainRotation));
CommandGroup fastAugerSequence = new CommandGroup();
fastAugerSequence.addSequential(new PrintCommand("Dispensing auger"));
fastAugerSequence.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
fastAugerSequence.addSequential(new WaitCommand(0.8));
CommandGroup augerSequence = new CommandGroup();
augerSequence.addSequential(new PrintCommand("Dispensing auger"));
augerSequence.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
augerSequence.addSequential(new WaitCommand(2));
CommandGroup firstAugerDrop = new CommandGroup();
firstAugerDrop.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
firstAugerDrop.addSequential(new WaitCommand(0.5));
firstAugerDrop.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
CommandGroup autoCommand = new CommandGroup();
autoCommand.addSequential(new PrintCommand("Starting autonomous"));
autoCommand.addSequential(new WaitCommand(delayTime));
if(shootInAuto){
autoCommand.addSequential(new FixedPointVisionTrackingCommand(FixedPointVisionTrackingCommand.PYRAMID_BACK_MIDDLE, TargetType.HIGH_GOAL), 4);
autoCommand.addParallel(firstAugerDrop);
autoCommand.addSequential(new SetShooterCommand(Shooter.SHOOTER_ON));
autoCommand.addSequential(new WaitCommand(2));
autoCommand.addSequential(new SetConveyorCommand(Conveyor.CONVEYOR_SHOOT_IN));
autoCommand.addSequential(new WaitCommand(1));
autoCommand.addSequential(new PrintCommand("Dispensing auger"));
autoCommand.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
autoCommand.addSequential(new WaitCommand(1.75));
autoCommand.addSequential(new PrintCommand("Dispensing auger"));
autoCommand.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
autoCommand.addSequential(new WaitCommand(1.75));
autoCommand.addSequential(new PrintCommand("Dispensing auger"));
autoCommand.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
autoCommand.addSequential(new WaitCommand(1.75));
autoCommand.addSequential(new PrintCommand("Dispensing auger"));
autoCommand.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
autoCommand.addSequential(new WaitCommand(2));
autoCommand.addSequential(new PrintCommand("Dispensing auger"));
autoCommand.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
autoCommand.addSequential(new WaitCommand(2));
autoCommand.addSequential(new PrintCommand("Dispensing auger"));
autoCommand.addSequential(new AugerRotateCommand(Auger.AugerDirection.AUGER_DOWN));
autoCommand.addSequential(new WaitCommand(2));
autoCommand.addSequential(new WaitForChildren());
autoCommand.addSequential(new WaitCommand(2));
}
//autoCommand.addSequential(new RepeatCommand(new PrintCommand("Testing print"), 5));
//autoCommand.addSequential(augerSequence, 5);
autonomousCommand = autoCommand;
autonomousCommand.start();
}