10 / Trajectories, Actions, and MeepMeep
Action Builder and Trajectories
Create line, strafe, turn, and spline actions with clear start poses.
10 / Trajectories, Actions, and MeepMeep
Create line, strafe, turn, and spline actions with clear start poses.
You will
This lesson is about planned robot motion using Road Runner 1.0. Students should understand that trajectories depend on tuning, localization, starting pose, and action composition. Road Runner is powerful, but it only works as well as the robot model underneath it.
A trajectory is not just code that moves the robot. It is a field plan: where the robot starts, which obstacles it avoids, and where it must end for the next mechanism action.
Before teaching splines, students should make line and turn actions reliable. Splines are powerful, but they hide too much when localization and tuning are still unproven.
Use small validation steps: create the drive, set the start pose, run a short action, validate localization, then add more complex paths. Mechanisms and vision should be composed as actions only after the drive path works alone.
For this specific lesson, students should first restate the goal in robot terms, then identify the value or behavior they expect to observe, then run the smallest test that proves the idea. The lesson should feel like a guided lab: predict, run, observe, explain, and only then extend.
TrajectoryActions.java · Java
Pose2d start = new Pose2d(12, -63, Math.toRadians(90));
Action preload = drive.actionBuilder(start)
.lineToY(-36)
.turn(Math.toRadians(-90))
.strafeTo(new Vector2d(48, -36))
.build();
Actions.runBlocking(preload);Road Runner failures should be separated into layers. If pose is wrong, fix localization. If straight motion is wrong, revisit tuning. If the path is risky, simplify or preview it. If the full auto fails, inspect the selected branch, active action, pose, mechanism state, and finish condition.
Check your understanding
Why make the start pose explicit?
0 of 1 answered
References
Finished reading?
You'll move on to “MeepMeep Preview” next.