*/
public class DefaultAutonStrategy extends CommandGroup {
+ // in feet
+ // distance along a platform
+ final double DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD = 4.0;
+ // number from -1 to 1
+ final double SPEED_FOR_PASSING_DEFENSE = 0.5;
+
public DefaultAutonStrategy(int position, Defense defense) {
- /*
- * pass defense drive forward do what has to be done to pass the defense
- * drive forward aim face tower aim shooter toward goal shoot
- */
// TODO: any variable that is not declared/instantiated are vars that need
// to be tested for their value
+ // pass the defense
switch (defense) {
+
case PORTCULLIS:
- // we are assuming that the robot is also driving forward as the
- // portcullis is being lifted
+ // we are assuming that LiftPortcullis() includes moving the defense arm
+ // and driving forward
+
addSequential(new LiftPortcullis());
+
case SALLY_PORT:
+
// addSequential();
+
case ROUGH_TERRAIN:
- addSequential(new DriveForDistance(distance, speed));
+ addSequential(
+ new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
+ SPEED_FOR_PASSING_DEFENSE));
case LOW_BAR:
- addSequential(new DriveForDistance(distance, speed));
+ addSequential(
+ new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
+ SPEED_FOR_PASSING_DEFENSE));
case CHEVAL_DE_FRISE:
case MOAT:
- addSequential(new DriveForDistance(distance, speed));
+ addSequential(new DriveForDistance(
+ DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
case ROCK_WALL:
- addSequential(new DriveForDistance(distance, speed));
+ addSequential(new DriveForDistance(
+ DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
case RAMPART:
- addSequential(new DriveForDistance(distance, speed));
+ addSequential(new DriveForDistance(
+ DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
default:
break;
}
+ // aim towards goal
+
+ // shoot
+
+ //
+
}
}