Skip to content

Trajectories with PathPlanner and Choreo

learnfrc.com
learnfrc.comAuthor
Veer Bajaj
Veer BajajMaintainer

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 (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 (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 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| Choreo
—|—|—
Style| Waypoints + manual handles| Solver finds optimal path
Strength| Fast iteration, event markers, full autos in GUI| Truly time-optimal trajectories
Tuning| Minimal| Define 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.

  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.
  • 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.

This lesson was adapted from learnfrc.com.