e1c56ab4 |
1 | package org.usfirst.frc.team3501.robot.commandgroups; |
2 | |
3 | import org.usfirst.frc.team3501.robot.Constants.Direction; |
4 | import org.usfirst.frc.team3501.robot.Robot; |
5 | import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance; |
6 | import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle; |
7 | |
8 | import edu.wpi.first.wpilibj.command.CommandGroup; |
9 | |
10 | /** |
11 | * |
12 | */ |
13 | public 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 | } |