*
*/
public class AutonGearThenBaselinePegCloseToBoiler extends CommandGroup {
-
-
- private static final int MOTOR_VALUE_TURN = 60;
- private static final int MOTOR_VALUE_FORWARD = 60;
- private static final double DISTANCE_FROM_BOILER_WALL = 111.5676;
- public AutonGearThenBaselinePegCloseToBoiler() {
-
-
- requires(Robot.getDriveTrain());
- addSequential(new DriveDistance(DISTANCE_FROM_BOILER_WALL/Math.sqrt(3)+52.4614,MOTOR_VALUE_FORWARD));
- addSequential(new TurnForAngle(60, Direction.LEFT , MOTOR_VALUE_TURN));
- addSequential(new DriveDistance(143.3272-2*DISTANCE_FROM_BOILER_WALL/Math.sqrt(3)-10.5,MOTOR_VALUE_FORWARD));
- //does not include drift distance
-
- }
+ private static final int MOTOR_VALUE_TURN = 60;
+ private static final int MOTOR_VALUE_FORWARD = 60;
+ private static final double DISTANCE_FROM_BOILER_WALL = 111.5676;
+
+ public AutonGearThenBaselinePegCloseToBoiler() {
+
+ requires(Robot.getDriveTrain());
+ addSequential(
+ new DriveDistance(DISTANCE_FROM_BOILER_WALL / Math.sqrt(3) + 52.4614,
+ MOTOR_VALUE_FORWARD));
+ addSequential(new TurnForAngle(60, Direction.LEFT, MOTOR_VALUE_TURN));
+ addSequential(new DriveDistance(
+ 143.3272 - 2 * DISTANCE_FROM_BOILER_WALL / Math.sqrt(3) - 10.5,
+ MOTOR_VALUE_FORWARD));
+ // does not include drift distance
+
+ }
}
package org.usfirst.frc.team3501.robot.commandgroups;
+import org.usfirst.frc.team3501.robot.Constants.Direction;
+import org.usfirst.frc.team3501.robot.Robot;
+import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
+import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
+
import edu.wpi.first.wpilibj.command.CommandGroup;
/**
*/
public class AutonGearThenBaselinePegCloseToRetrievalZone extends CommandGroup {
- public AutonGearThenBaselinePegCloseToRetrievalZone() {
- // Add Commands here:
- // e.g. addSequential(new Command1());
- // addSequential(new Command2());
- // these will run in order.
+ private static final double DISTANCE_FROM_RETRIEVAL_ZONE_WALL = 111.5676;
+ private static final int MOTOR_VALUE_TURN = 60;
+ private static final int MOTOR_VALUE_FORWARD = 60;
+
+ public AutonGearThenBaselinePegCloseToRetrievalZone() {
- // To run multiple commands at the same time,
- // use addParallel()
- // e.g. addParallel(new Command1());
- // addSequential(new Command2());
- // Command1 and Command2 will run in parallel.
+ double x = DISTANCE_FROM_RETRIEVAL_ZONE_WALL;
+ requires(Robot.getDriveTrain());
+ addSequential(new DriveDistance(
+ DISTANCE_FROM_RETRIEVAL_ZONE_WALL / Math.sqrt(3) + 52.4614,
+ MOTOR_VALUE_FORWARD));
+ addSequential(new TurnForAngle(60, Direction.RIGHT, MOTOR_VALUE_TURN));
+ addSequential(new DriveDistance(
+ 143.3272 - 2 * DISTANCE_FROM_RETRIEVAL_ZONE_WALL / Math.sqrt(3) - 10.5,
+ MOTOR_VALUE_FORWARD));
+ // does not include drift distance
- // A command group will require all of the subsystems that each member
- // would require.
- // e.g. if Command1 requires chassis, and Command2 requires arm,
- // a CommandGroup containing them would require both the chassis and the
- // arm.
- }
+ }
}