Skip to lesson
Westlake RoboticsLearn
Vault

FIRST Tech Challenge

Loading progress…

  • Action Builder and Trajectories
  • Custom Mechanism Actions
  • MeepMeep Preview
  • Three-Branch Autonomous Structure
  • Build a Full Road Runner Autonomous

Three-Branch Autonomous Structure

Organize reusable autonomous branches without tying the pattern to one season.

Road Runner 1.0 Actions and AutonomousRoad Runner

In this lesson, you will:

  • Split paths by branch.
  • Reuse mechanism actions.
  • Keep selection readable.

Concept narrative

A three-branch autonomous combines vision selection, several path options, and mechanism actions. The organization matters as much as the path math.

Robot mental model

The robot should have a small menu of tested routines rather than a giant method full of copied path code. Common actions should be reused.

Implementation walkthrough

Create branch builders, common score/park actions, and one selector. Keep each path named for field intent.

CenterstageAuto.javaJava

Action selected;
boolean visionAccepted = true;
switch (propPosition) {
    case LEFT:
        selected = leftBranchPath();
        break;
    case RIGHT:
        selected = rightBranchPath();
        break;
    case CENTER:
        selected = centerBranchPath();
        break;
    case UNKNOWN:
    default:
        visionAccepted = false;
        selected = new InstantAction(() -> robot.safeState());
        break;
}

Action routine = visionAccepted
    ? new SequentialAction(selected, score(), park())
    : selected;
try {
    Actions.runBlocking(routine);
} finally {
    robot.safeState();
}

Common mistakes and debugging

Copied paths drift apart. If one branch is fixed and others are not, the code becomes unreliable. Extract shared pieces.

Practice

Refactor a three-branch auto so common scoring and parking actions are reused.

Checkpoint

  • Common actions are reused.
  • Branch names match field intent.
  • Default branch is safe.
  • The test record includes the setup, prediction, and observed result.
  • A teammate can repeat the check from the saved evidence without guessing.

Reflection check

Check your understanding before moving on.

Why should three autonomous branches share scoring and parking actions when possible?
What should the selector do for an unexpected prop result?

0 of 2 answered

References

Road Runner autonomous organization guideCommunity-contributed Road Runner 1.0 example used for action and branch organization, not season-specific field geometry.Road Runner 1.0 ActionsAction composition, custom actions, and autonomous structure.
Loading lesson progress
Previous lessonMeepMeep PreviewNext lessonBuild a Full Road Runner Autonomous