finished Auton strat for peg close to boiler in any alliance
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commandgroups / AutonGearThenBaselinePegCloseToBoiler.java
CommitLineData
e1c56ab4 1package org.usfirst.frc.team3501.robot.commandgroups;
2
3import org.usfirst.frc.team3501.robot.Constants.Direction;
4import org.usfirst.frc.team3501.robot.Robot;
5import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
6import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
7
8import edu.wpi.first.wpilibj.command.CommandGroup;
9
10/**
11 *
12 */
13public class AutonGearThenBaselinePegCloseToBoiler extends CommandGroup {
14
15
16 private static final int MOTOR_VALUE_TURN = 60;
17 private static final int MOTOR_VALUE_FORWARD = 60;
18 private static final double DISTANCE_FROM_BOILER_WALL = 111.5676;
19
20 public AutonGearThenBaselinePegCloseToBoiler() {
21
22
23 requires(Robot.getDriveTrain());
24 addSequential(new DriveDistance(DISTANCE_FROM_BOILER_WALL/Math.sqrt(3)+52.4614,MOTOR_VALUE_FORWARD));
25 addSequential(new TurnForAngle(60, Direction.LEFT , MOTOR_VALUE_TURN));
26 addSequential(new DriveDistance(143.3272-2*DISTANCE_FROM_BOILER_WALL/Math.sqrt(3)-10.5,MOTOR_VALUE_FORWARD));
27 //does not include drift distance
28
29 }
30}