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 theAutoRoutineclass (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 genericSendableChooser).
PathPlanner vs. Choreo#
| 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.
The workflow#
- Model your robot's dimensions/constraints in the tool.
- Draw the path on a field image and set rotations/markers.
- Save it into your project's
src/main/deployfolder. - Load and run it from your autonomous command.
the part worth keeping
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.
Programming, Controls & SensorsAutonomous: Odometry, Trajectories, and Simulationlesson 2 of 4
Keep going
Take the quiz+10 XP with an accountMore in Autonomous: Odometry, Trajectories, and Simulation
where this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- docs.wpilib.orgPath Planning (WPILib overview)
- pathplanner.devPathPlanner Documentation
- choreo.autosChoreo Documentation
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 12 min readChoreo vs PathPlanner: Planning FRC Autonomous TrajectoriesCompare Choreo and PathPlanner for FRC autonomous trajectories: how Choreo's time-optimal solver differs from PathPlanner's GUI paths, and when to use each./blogread it
- 8 min readFRC Autonomous with PathPlanner: A Beginner's Guide to Auto RoutinesLearn how FRC teams build autonomous routines with PathPlanner (PPLib): paths vs autos, AutoBuilder, named commands, odometry, tuning, and Choreo./blogread it
answer sheet
Lesson quiz
All 3 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 3 answered
01In PathPlanner, what are the smooth robot paths primarily defined by?
02A key advantage of Choreo over hand-tuning a PathPlanner path is that Choreo:
03On 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 & Sensorsopenclose
01 / prerequisites
02 / foundations-tools-and-first-program
03 / robot-program-and-command-based
04 / motors-and-control
05 / autonomous-trajectories-simulation
06 / sensing-fundamentals
07 / encoders
08 / gyros-imus-orientation
09 / closed-loop-control
10 / vision-pose-estimation
11 / worked-examples-mini-projects
- Not read yet:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not read yet:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not read yet:Mini-Project: A Teleop Swerve Drive Subsystem
- Not read yet:Mini-Project: An Autonomous Routine with PathPlanner
- Not read yet:Mini-Project: Vision-Aligned Scoring with Limelight
12 / common-mistakes-troubleshooting
13 / advanced-techniques-case-studies
- Not read yet:State-Space Control and Kalman Filtering
- Not read yet:Log Replay Architecture with AdvantageKit
- Not read yet:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not read yet:Robot Coordination, Alerts, and Operator Feedback
- Not read yet:Case Study: Hardening Software Before an Event