1 package org
.usfirst
.frc
.team3501
.robot
.commandgroups
;
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
;
8 import edu
.wpi
.first
.wpilibj
.command
.CommandGroup
;
13 public class AutonGearThenBaselinePegCloseToRetrievalZone
extends CommandGroup
{
15 private static final double DISTANCE_FROM_RETRIEVAL_ZONE_WALL
= 111.5676;
16 private static final int MOTOR_VALUE_TURN
= 60;
17 private static final int MOTOR_VALUE_FORWARD
= 60;
19 public AutonGearThenBaselinePegCloseToRetrievalZone() {
21 double x
= DISTANCE_FROM_RETRIEVAL_ZONE_WALL
;
22 requires(Robot
.getDriveTrain());
23 addSequential(new DriveDistance(
24 DISTANCE_FROM_RETRIEVAL_ZONE_WALL
/ Math
.sqrt(3) + 52.4614,
25 MOTOR_VALUE_FORWARD
));
26 addSequential(new TurnForAngle(60, Direction
.RIGHT
, MOTOR_VALUE_TURN
));
27 addSequential(new DriveDistance(
28 143.3272 - 2 * DISTANCE_FROM_RETRIEVAL_ZONE_WALL
/ Math
.sqrt(3) - 10.5,
29 MOTOR_VALUE_FORWARD
));
30 // does not include drift distance