Gray Matter
WorkshopPathPlanner
WPILib 2027 is still in alpha: these pages change as the APIs settle.
LESSON 19

PathPlanner Paths and Autos

PathPlanner is a field editor for shaping reusable path segments and assembling them into an autonomous plan. This lesson covers the robot configuration the editor needs, one drawn path, and event markers. The routine itself belongs to the next lesson.

9 minutes
You’ll need
  • A calibrated swerve drive with trustworthy odometry.
  • The robot project opened once in the PathPlanner desktop app.
  • The current season field image and the robot's measured dimensions.

A path is one continuous drive segment. An auto is an ordered routine that can combine paths, waits, and mechanism events.

For a holonomic drivetrain, direction of travel and robot rotation are separate. The robot can follow a curve while facing a game piece or scoring target.

Plan geometry in the field editor. Keep robot behavior in commands. Connect the two only at deliberate event points.

2027 ALPHA

Do not paste the current RobotContainer examples

PathPlanner's published Java integration examples target the classic Commands v2 stack and use edu.wpi.first,RobotContainer, and frc2.Command-style assumptions. This workshop uses Commands v3, OpModes, andorg.wpilib. Use the editor in this lesson, but do not add v2 integration code to the 2027 project. The autonomous lesson builds its routine from the v3 commands already supplied by the workshop.

Separate a path from an auto

Reusable movement
Path
One segment from a start to an end. Waypoints shape the curve; the goal end rotation and rotation targets control where a holonomic robot faces; constraints cap motion.
Complete routine
Auto
An ordered plan made from paths and actions. The same path can appear in several autos without being redrawn.

Draw separate paths for actions you may reuse: leave the starting area, reach a pickup, return to score. A single path with many unrelated responsibilities is harder to tune and harder to replace.

Configure the editor from measurements

  1. Open the root of the robot project, not the src folder.
  2. Select the current field and enable holonomic mode.
  3. Enter robot mass, moment of inertia, wheel radius, drive gearing, current limit, and module positions from the calibrated drivetrain.
  4. Enter conservative default velocity, acceleration, angular velocity, and angular acceleration constraints.
  5. Set the robot footprint so the preview shows whether bumpers clear field obstacles.

The editor cannot correct a bad measurement

A path preview is only as honest as the robot configuration. Wheel radius and module position came from Swerve Calibration; do not tune the drawn curve to compensate for odometry that is still wrong.

Draw one testable path

  1. Place the first waypoint at the robot's known starting pose.
  2. Place the final waypoint in open field space, not at a scoring target yet.
  3. Adjust control handles so the curve is smooth and does not skim an obstacle.
  4. Set the goal end rotation, then add rotation targets only where the robot needs to turn along the way.
  5. Apply slower constraints near tight geometry instead of slowing the entire route.
  6. Name the segment for its job, such as Leave Start Left, and save it.
FOOTPRINT

The center point is not the whole robot

A curve can clear an obstacle while the bumper clips it. Inspect the full robot preview through turns, especially where rotation and translation happen together.

Add events one at a time

Event markers connect route progress to robot commands. Name the event after an action such as Start Intake, not after a button or motor voltage. First test the path with no events. Then add one event at a time so a mechanism problem cannot masquerade as a path-following problem.

  • Use position-based events for actions tied to a location.
  • Use waits for intentional time, not to hide a command with no finish condition.
  • Keep final alignment as its own short segment when precision matters.
  • Give every event command a name that matches the editor exactly.

Hand off the route plan

Finish with one tested-looking path segment, a written starting pose, the end pose, constraints, and a short list of intended events. The Autonomous lesson will turn that plan into an @AutonomousOpMode and v3 commands without depending on concepts from Workshops 5 or 6.

PathPlanner: Editing paths and autos

Check yourself

What separates a path from an auto?

On a holonomic path, what sets the direction the robot faces?

Where do the mass, wheel radius, and module positions in the editor come from?

The drawn curve clears an obstacle. What can still hit it?

You have drawn a new path. When do the event markers go on?

How should an event marker be named?

Pick an answer for each.