Skip to content
2 min read
In progress

Trajectories with PathPlanner and Choreo

Design smooth driving paths visually with PathPlanner or Choreo, then follow them in code.

Lesson
18 / 51
Reward
+10XP

Sign in to track progress, earn XP, and save lessons.

What a trajectory is

A trajectory is a time-parameterized path: at each moment it specifies where the robot should be and how fast it should be moving. A trajectory follower compares this to your odometry pose and commands ChassisSpeeds to stay on the path. Instead of hand-coding curves, teams use visual tools.

PathPlanner

PathPlanner (created by Michael Jansen) is the most widely used FRC path tool. It's a GUI where you place waypoints, drag Bézier-style control handles to shape curves, set rotation targets (great for swerve), and add event markers to trigger commands mid-path. Modern PathPlanner generates paths that largely "just work" with little tuning.

Install PathPlannerLib as a vendordep. The library's AutoBuilder turns saved paths and autos into commands:

// Configure AutoBuilder once (with your pose supplier, drive method, etc.),
// then load a full auto built in the GUI:
Command auto = new PathPlannerAuto("My Auto");

PathPlanner lets you build entire autonomous routines visually — paths plus the commands fired at event markers — and load them as a single command.

Choreo

Choreo (by the Sleipnir Group) is a time-optimal drivetrain trajectory planner: given your robot's real constraints (mass, motor limits, wheel grip), it solves for the fastest physically possible trajectory through your waypoints (its solver is built on TrajoptLib/Sleipnir). It's especially popular for swerve where squeezing out time matters.

Install ChoreoLib as a vendordep. Choreo and PathPlanner interoperate — you can load a Choreo trajectory through PathPlanner via PathPlannerPath.fromChoreoTrajectory(...), or use ChoreoLib directly.

ChoreoLib's auto tools

ChoreoLib provides higher-level helpers:

  • AutoFactory — builds auto routines from trajectories, either as command compositions (simple autos) or via the AutoRoutine class (complex, branching autos).
  • AutoChooser — sends your list of autos to the dashboard for pre-match selection. It lazy-loads routines and is the recommended chooser when using ChoreoLib (instead of the generic SendableChooser).

PathPlanner vs. Choreo

PathPlannerChoreo
StyleWaypoints + manual handlesSolver finds optimal path
StrengthFast iteration, event markers, full autos in GUITruly time-optimal trajectories
TuningMinimalDefine robot constraints once

Many teams use both: PathPlanner for quick everyday paths and full-auto authoring, Choreo when they need the fastest possible route. Both are free, open-source, and well-documented.

The workflow

  1. Model your robot's dimensions/constraints in the tool.
  2. Draw the path on a field image and set rotations/markers.
  3. Save it into your project's src/main/deploy folder.
  4. Load and run it from your autonomous command.
Spot an error or something out of date?Log in to suggest an edit

Key takeaways

  • A trajectory specifies position and velocity over time; a follower keeps the robot on it.
  • PathPlanner is a GUI for waypoint paths, event markers, and full autos via AutoBuilder/PathPlannerAuto.
  • Choreo computes time-optimal trajectories from your robot's physical constraints.
  • PathPlanner and Choreo interoperate (PathPlannerPath.fromChoreoTrajectory); many teams use both.
  • ChoreoLib's AutoFactory/AutoRoutine build autos; AutoChooser picks them at the dashboard.

Lesson quiz

Required

Answer all 3 questions correctly to complete this lesson.

01.In PathPlanner, what are the smooth robot paths primarily defined by?

02.A key advantage of Choreo over hand-tuning a PathPlanner path is that Choreo:

03.On holonomic (e.g., swerve) drivetrains, how does PathPlanner treat the robot heading relative to its direction of travel?

Answer every question to submit.

All 51 lessons in Programming, Controls & Sensors