Java 类edu.wpi.first.wpilibj.command.WaitForChildren 实例源码

项目:Team3310FRC2014    文件:Shoot1BallBackAutonomousHot.java   
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));
}
项目:Storm2014    文件:DriveAndShoot2Ball.java   
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());
    }
项目:Team3310FRC2014    文件:Shoot1BallBackAutonomous.java   
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));
}
项目:Team3310FRC2014    文件:Shoot1BallShortAutonomousHot.java   
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));
}
项目:Team3310FRC2014    文件:Shoot2BallAutonomous.java   
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));
}
项目:Team3310FRC2014    文件:Shoot1BallAutonomous.java   
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));
}
项目:Team3310FRC2014    文件:Shoot1BallAutonomousHot.java   
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));
}
项目:Team3310FRC2014    文件:Shoot1BallShortAutonomous.java   
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));
}
项目:Team3310FRC2014    文件:Shoot2BallBackAutonomous.java   
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));
}
项目:2014_Main_Robot    文件:Center_RotDrvFwdHotGoal_1Ball.java   
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   
/**
 * 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();
}