| 1 | package org.usfirst.frc.team3501.robot.commands.auton; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.command.CommandGroup; |
| 6 | |
| 7 | /*** |
| 8 | * This command will drive the robot through the low bar. |
| 9 | * |
| 10 | * dependency on sensors: encoders |
| 11 | * dependency on subsystems: drivetrain |
| 12 | * dependency on other commands: DriveForDist |
| 13 | * |
| 14 | * pre-condition: robot is flush against the ramp of the outerworks in front of |
| 15 | * the low bar |
| 16 | * |
| 17 | * post-condition: the robot has passed the low bar and is in the next zone |
| 18 | * |
| 19 | * @author Meryem and Avi |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | public class PassLowBarDistance extends CommandGroup { |
| 24 | |
| 25 | private final double DISTANCE = 4.0; |
| 26 | private final double DEFAULT_SPEED = 0.5; |
| 27 | |
| 28 | public PassLowBarDistance() { |
| 29 | // TODO: need to add sequential for retracting the arms and shooting hood |
| 30 | // once those commands are made |
| 31 | addSequential(new DriveDistance(DISTANCE, DEFAULT_SPEED)); |
| 32 | } |
| 33 | |
| 34 | public PassLowBarDistance(double speed) { |
| 35 | addSequential(new DriveDistance(DISTANCE, speed)); |
| 36 | } |
| 37 | } |