Spectrum 3847
Paths & Autonomous
An interactive course on FRC autonomous: paths, speed limits, following, PathPlanner vs Choreo vs point-to-point, mirroring and alliance flips, events during auto, and reacting to game pieces.
20 seconds, no driver.path → speed plan → follow it → react
For the first 20 seconds of a 2026 match nobody touches the controls. The robot starts from a spot we chose, drives a path we drew, and has to believe its own guess of where it is. This course follows one of our real 2026 autos from the drawing in PathPlanner to the robot on the carpet.
- 01 · 6 minWhat an auto isA start pose, a plan, and a robot that only thinks it is on the plan.
- 02 · 7 minShaping a pathWaypoints, control points, and facing one way while driving another.
- 03 · 7 minSpeed along the pathMax speed, acceleration, corners and slow zones set how long a path takes.
- 04 · 7 minFollowing itChasing a moving target: the trajectory's speed plus small corrections, and why the robot still comes off the path.
- 05 · 8 minWays to build an autoHand-shaped paths, optimized trajectories, driving to a point, and pathfinding.
- 06 · 6 minLeft, right, red and blueOne auto for four starts: mirror it for the other side, flip it for the other alliance.
- 07 · 7 minDoing things during autoStarting the intake and the shooter by time, by place, or by what the robot sees.
- 08 · 8 minAutos that reactDriving to the piece that is really there, giving up on an empty spot, and lining up to score.
What an auto is
A start pose, a plan, and a robot that only thinks it is on the plan.
A 2026 REBUILT match starts with a 20 second autonomous period. Nobody drives. The robot runs an auto: a list of moves and actions we wrote before the match, picked from a menu on the driver station while the robot sits on the field.
Every auto starts from a start pose: a spot on the field and a direction to face. The first thing the code does is tell odometry "you are here". From then on the robot only knows where it is by adding up its wheel movements, plus AprilTag sightings when it can see them (the Vision course covers those). If the drive team sets the robot down 20 cm off its start pose, the whole auto runs 20 cm off.
The catch is the word "thinks". The follower can hold the robot's guess right on the plan and still miss, because the guess is wrong. Wheels slip a little on every start and stop, and a hit from another robot moves ours without the wheels turning at all.
Watch the 20 s auto. Press Bump it, then turn Vision off and Replay. Watch the gap between plan and robot.
Starting the auto.
Simplified: odometry counts 3% long and 1° off, and a bump is 30 cm (illustrative). Paths, PathPlanner's times, the 2.5 s shot and vision zones are ours.
With vision off, the error only grows: 3% of the 31 m it drives is 92 cm, and nothing in the wheels can tell the robot it's wrong. With vision on, the error shrinks every time the robot passes through a blue stretch, and the follower drives it back onto the plan. A bump outside those stretches stays until the next one.
It runs out of time
PathPlanner plans our three paths at 5.91, 7.61 and 3.97 s. Add two 2.5 s shots and the 0.01 s wait our code puts before each path, and the auto needs 22.5 s. The buzzer stops the robot 2.5 s early, 2.6 m into the last 9.6 m path.
Running long is common. Most autos in our match logs run a little longer than their plan. At the 2026 Championship we also saw one field's auto timing run several seconds long. Put the moves that score first, leave margin at the end, and make the last path one you can lose.
The robot never "sees" the dashed line. It follows its own guess. That's why a good auto is three things that have to agree: the start pose the drive team sets, a plan the robot can drive in 20 s, and a pose estimate good enough to follow it.
The one thing to remember The robot drives its guess of where it is along the plan. The plan can be perfect and the auto still miss, if the start pose or the guess is off.
Next: Shaping a path ↓
Shaping a path
Waypoints, control points, and facing one way while driving another.
A path is drawn from a few points. In PathPlanner you place waypoints, the spots the robot must drive through, and the tool draws a smooth curve between them. Our first 2026 path, 1st-TBTB 1, has 6 waypoints and is 11.3 m long.
Each waypoint has one or two control points, the handles sticking out of it. A handle's direction sets which way the curve heads through the waypoint. Its length sets how far the curve keeps going that way before it bends toward the next waypoint: a long handle makes a wide, lazy turn, a short one a tight corner.
B(t) = (1−t)³·P₀ + 3(1−t)²t·P₁ + 3(1−t)t²·P₂ + t³·P₃, t from 0 to 1
Between two waypoints the curve is a cubic Bézier curve: P₀ and P₃ are the waypoints, P₁ and P₂ the handles between them. The curve starts at P₀ heading toward P₁ and arrives at P₃ coming from P₂. It doesn't pass through the handles; they only pull on it. PathPlanner keeps a waypoint's two handles on one straight line through it, so the curve never has a kink.
Drag a waypoint or a square handle. Tighten a turn until it goes pink, then switch Heading.
Drag a handle.
Simplified: heading blends straight between targets, with no turn-rate limit, at a constant 1.5 m/s. The path and targets are our first TrenchBump-TrenchBump path.
How sharp is a turn?
The colors are curvature: how sharply the path bends, measured as 1 ÷ the radius of the circle that fits the bend. A 2 m radius turn has curvature 0.5 per meter; a 0.5 m one has 2. Curvature matters because a robot going around a bend needs sideways grip, and the tighter the bend the less speed it can carry. Chapter 3 turns that into a number.
Facing one way, driving another
A tank drive can only drive the way it faces, so its heading is the direction of travel. A swerve is holonomic: it can drive in any direction while facing any direction. PathPlanner gives the robot its heading separately from the curve, with rotation targets: markers along the path that say "face 90° here". Between two targets the robot turns smoothly from one heading to the next.
Our 1st-TBTB 1 mostly faces the way it drives: −90° while it drives down the center line, 180° on the way back. In the last stretch the heading swings to 135° while the robot still drives straight at 180°, so it's already turned for the shot when it stops. Switch the lab to "Face the way it drives" and the robot arrives at 180° instead.
The one thing to remember Waypoints say where the path goes, handles say how it bends between them, and on a swerve rotation targets say which way the robot faces, separately from which way it drives.
Next: Speed along the path ↓
Speed along the path
Max speed, acceleration, corners and slow zones set how long a path takes.
A path is only a shape. Before the robot can drive it, the planner has to decide how fast to go at every point along it: a velocity profile. That profile sets how long the path takes, and in a 20 s auto the time is what we're really spending.
Three limits set the profile. The robot can't go faster than a max velocity (ours: 3.5 m/s in auto, below the drive's 4.5 m/s top speed). It can't change speed faster than a max acceleration (ours: 5.0 m/s²), so it needs room to speed up and room to brake. And it can't take a turn faster than its grip allows.
How the planner works it out
Walk along the path in small steps. At each step, take the lowest of three caps: max velocity, the speed limit of any constraint zone it's in, and the turn limit. The turn limit comes from the sideways acceleration a circle needs, v² ÷ radius. Keep that under a limit and:
v ≤ √(aside × radius)
Then two passes. Forward from the start at rest, the speed can grow by at most v² = v₀² + 2·a·Δs per step. Backward from the end at rest, the same rule, which is the braking. The planned speed is the lowest of the caps and both passes, and the path's time is each step's length divided by its average speed, added up.
Raise Max velocity to 4.5 m/s and read the time saved. Then try Max acceleration and the slow zone.
Planning…
Simplified: turns use the same limit as Max acceleration. The dotted line is PathPlanner's real plan. Limits, path and zone are ours.
In this lab, at our settings, this path takes 5.11 s, and the robot is at 3.5 m/s for only 17% of it. Raising max velocity to 4.5 m/s saves 0.11 s, because the path is never straight for long enough to reach 4.5 m/s. Doubling max acceleration to 10 m/s² saves 0.74 s, since every start, stop and corner gets shorter. On a path this twisty, acceleration buys time and top speed mostly doesn't.
PathPlanner plans the same path at 5.91 s, the dotted line. It works out each wheel's force from the Kraken's torque at 10 V and our 80 A current limit, gives each wheel its own curve through a turn, and saves some wheel speed for turning the robot while it drives. Its plan starts at about 4.2 m/s², not 5.0, and dips in every turn. We generated its plan with PathPlannerLib 2026.1.2 from our settings.json; chapter 1's auto and chapter 4's follower run on these times.
The profile is the same speed-up, cruise, slow-down trapezoid as Motion Magic in the CTRE course, bent by every turn. The tightest bend on this path is a 0.30 m radius, which caps the robot at about 1.2 m/s there however high the other limits go.
The one thing to remember A path's time comes from its whole speed plan, not its top speed. Corners and acceleration usually cost more time than max velocity saves.
Next: Following it ↓
Following it
Chasing a moving target: the trajectory's speed plus small corrections, and why the robot still comes off the path.
PathPlanner turns the path and its speed plan into a trajectory: for every moment of the path, where the robot should be, how fast it should be going and which way it should face. Our 1st-TBTB 1 trajectory is 5.91 s long. Following it means asking, 50 times a second, "where should I be right now?" and driving there.
So the target is a point that moves along the path on a clock. Every 20 ms the follower looks up the trajectory at the current time, and the point has moved on up to 7 cm (at 3.5 m/s). The robot isn't trying to reach the end of the path; it's chasing that dot.
Feedforward plus a small push
Most of the command is feedforward: the trajectory already says how fast the robot should be moving in x and y and how fast it should be turning, so the follower sends that. If the robot did exactly what it was told, that would be enough.
It doesn't, so the follower adds feedback on each of x, y and heading separately. With a translation kP of 4, the robot being 10 cm behind the dot adds 0.4 m/s toward it. With a rotation kP of 3, being 10° off adds 30°/s of turn. In code this is PPHolonomicDriveController: velocity feedforward plus a PID controller per axis.
vx = vx, trajectory + kP × (xtarget − xrobot) (same for y; θ with its own kP)
Drag kP to 0 and compare the tracking error, then back to 4. Bump it with Vision on, then off.
Following the path.
Simplified: a 0.15 s drive lag, 3% odometry error and a 30 cm bump (all illustrative). Gains and path are ours (Swerve.java, the first TrenchBump-TrenchBump path).
kP's unit is meters per second of extra speed per meter of tracking error. At 0 the robot replays the trajectory's speeds blind: it falls behind on every speed-up and cuts every corner (46 cm at worst in the lab), and a bump stays in for good. At our 4 the worst is 17 cm, and it ends 11 cm from the end pose: the path's time runs out while it is still catching up. Push kP much higher and a real robot starts to shake, because every centimeter of sensor noise becomes a speed command.
Why it still comes off the path
The follower corrects the error it can measure, and it measures with odometry. Four things put the real robot somewhere else. Wheels slip on hard starts and stops, so odometry counts distance the robot didn't cover. A bump from another robot or a bounce over the field's bump moves it without the wheels turning. A weak controller (kP too low) lets it fall behind. And if the start pose was set wrong, odometry was wrong from the first loop.
Only the weak controller shows up in the error the follower sees. Slip, bumps and a bad start pose make the robot's guess wrong, and then the follower drives the wrong robot onto the dot: the outline sits on the path while the real robot doesn't. That's what the vision stretches are for. Inside a poseUpdate stretch, AprilTag sightings pull the guess back to the truth, the error suddenly becomes visible, and kP drives the robot back. The Vision course shows how those updates reach the pose estimator: Getting it into the robot.
The one thing to remember The follower sends the trajectory's own speeds and adds kP × the error from its pose estimate. It can only fix error it can see, so a good auto needs a good pose estimate as much as good gains.
Next: Ways to build an auto ↓
Ways to build an auto
Hand-shaped paths, optimized trajectories, driving to a point, and pathfinding.
Chapters 2 and 3 built an auto one way: draw a path, then plan the speed along it. That's what we do, but it isn't the only way. Strong FRC teams build autos in at least four ways, and each one is good at a different thing: speed, setup time, or coping when the field isn't what you planned for.
1. Hand-shaped path (PathPlanner)
You place waypoints and drag their handles until the curve looks right, then PathPlanner plans the speed along it from your max velocity and acceleration. Rotation targets, event markers and constraint zones are all placed by position along the path. The shape is yours, so it's easy to read and easy to fix at a competition: move a waypoint 10 cm and redeploy.
The weak spot is the shape itself. The planner makes the path as fast as it can, but it never changes the path. If you drew a turn wider than it needed to be, the robot drives the wider turn.
2. Optimized trajectory (Choreo)
In Choreo you don't draw the curve. You place waypoints and say what each one fixes: a pose waypoint fixes position and heading, a translation waypoint only position, and an empty waypoint neither (it's a hint for the shape). Then you add constraints, such as stop point, max velocity, keep-in and keep-out regions, and point at. An optimizer then searches for the time-optimal trajectory that the robot's dynamics allow: shape, speed and heading all at once.
Events are set as a time offset from a waypoint, not a spot on the path, and a path can be split at waypoints so the code can run the pieces one at a time. The price is less direct control: you move a constraint, press Generate, and see what the solver makes of it.
3. Point-to-point (drive to pose)
No path at all. With drive to pose the robot measures the straight-line distance to a target pose, and a PID controller turns that distance into a speed. The speed is split into x and y by the angle to the target, and a second, clamped PID turns the robot to the target heading. An auto is a list of targets, one after another.
2910 (Jack in the Bot) ran almost all of their 2025 autos this way, and said that from scratch they would drop Choreo and use drive to point with a moving target. 6328's 2025 drive-to-pose code scales down its feedforward as the robot gets close, so it doesn't overshoot. CTRE's Phoenix 6 added LinearPath in 2026, a straight line between two poses with velocity and acceleration limits, and 5712's 2027 template builds its autos from DriveToPose legs on it instead of PathPlanner.
4. Pathfinding (PathPlanner AD*)
PathPlanner can also plan a path itself, when the command starts. Pathfinding searches a navigation grid for a route to the goal pose around anything marked blocked, then drives it with the same speed planning as chapter 3. Code can add moving obstacles (setDynamicObstacles), and AD* keeps improving the route in the background, so the robot can change its mind partway there.
You get a route around things you didn't plan for. You give up control of the shape, and PathPlanner's docs point out that fine alignment at the end is hard, so teams often pathfind close and then follow a short drawn path (pathfindThenFollowPath).
Pick an approach and watch it run. Then Move the piece, or add a defender, and see which still finish.
Planning…
Simplified: no turning time, one 5.0 m/s² grip limit, a plain A* pathfinder, and an optimizer over PathPlanner's handles, not Choreo's solver. Limits are ours.
On the open field the optimized path takes 3.80 s and the hand-shaped one 3.94 s, 0.14 s slower on the same limits. The search kept the waypoints and shortened the handles, so the robot runs nearly straight lines and makes one tight turn at the piece. With 3 waypoints there's little shape left to find; Choreo gains more on longer paths, and by solving heading and the motors' real torque too, which this lab leaves out.
Point-to-point takes 5.56 s, the slowest, because speed = 2 × distance means it's already slowing down 1.75 m out from each target. That long tail is what 6328's distance-scaled feedforward and CTRE's trapezoid-profiled LinearPath are for. It's also the only fixed-code approach that still gets a moved piece, since it aims at wherever the target is.
Add the defender and three of the four drive into it. Pathfinding goes around it in 4.46 s, 0.56 s more than its open-field time. All four hit 5.0 m/s², our limit; what differs is where they spend it.
The one thing to remember A fixed path, drawn or optimized, is fastest when the field matches the plan. Driving to a pose copes with a target that moves, and pathfinding copes with something in the way.
Left, right, red and blue
One auto for four starts: mirror it for the other side, flip it for the other alliance.
We draw every auto once, for the blue alliance, starting on the left. In a match we might start on either side and either alliance, which is four starting spots. Two separate transforms get us there, and they answer different questions.
Left or right: mirror
In 2026 you can start under either trench, on the left or right of your alliance's hub. The field is the same on both sides, so the right-side auto is the left one reflected across the field's long center line: y becomes 8.07 m − y, and a heading of θ becomes −θ. That's a mirror. Our TrenchBump-TrenchBump Left starts at y = 7.48 m facing 0°; TrenchBump-TrenchBump Right starts at 0.59 m, also facing 0°.
That only works on a field whose two sides match. 2024 Crescendo's didn't: the amp was on one long wall and the source in the far corner of the other, so there was no mirror twin to make. Our 2024 autos were each drawn for one start and named for it, like Front Rush 23 from 2024 Worlds: start against the front of the speaker, take the middle note, rush the center line, then come back for the other two front notes.
Blue or red: flip by the field's symmetry
The red alliance plays from the other end, so a blue auto has to move there. How depends on the field. 2026 REBUILT is rotationally symmetric: red's half is blue's half turned 180° about the center of the field, so the alliance flip is x → 16.54 − x, y → 8.07 − y, θ → θ + 180°. 2024 Crescendo was mirrored instead: both amps were on the same wall, so red's half was blue's reflected across the halfway line, x → 16.54 − x with y kept.
The two combine. Red-right on 2026 is blue-left mirrored for the side, then rotated for the alliance.
Switch Alliance and Side, then Field to 2024. Last, pick Wrong rule on red.
TrenchBump-TrenchBump Left on blue.
Shots left out. 2026: our TrenchBump-TrenchBump Left. 2024: Ultraviolet's Front Rush 23 from Worlds, as PathPlanner 2024 planned it, on PathPlanner's field image. Side is off on 2024.
On 2026 a left auto stays a left auto for red: rotating turns the red drivers' left into blue's left too. On 2024's mirrored field it doesn't. The robot keeps its y, so an auto that starts on the blue drivers' left starts on the red drivers' right. Front Rush 23 starts at y = 5.55 m, in front of the speaker: left of center for the blue drivers, right of center for red.
Using the wrong rule on 2026 puts the plan's start 6.9 m from the robot. Odometry is reset to that start, so the robot believes it's under the other trench and drives its whole auto shifted across the field.
What flips and what doesn't
Flip everything that belongs to one alliance: the paths, their headings and rotation targets, and aim points like the hub we shoot at. Our launcher code picks the red hub on red (HubTargetFactory.java). Never flip the field itself. WPILib's field origin is always the blue alliance's right corner, for both alliances, so the AprilTag layout, vision poses and odometry stay in blue coordinates. Flip a vision pose "for red" and every tag sighting teleports the robot to the other end.
The one thing to remember Mirror picks the side, the field's symmetry picks the alliance, and the field's own coordinates never flip.
Doing things during auto
Starting the intake and the shooter by time, by place, or by what the robot sees.
A path only moves the drivetrain. Everything else in an auto, the intake, the shooter spinning up, the shot itself, is a separate command that has to start at the right moment. In our 2026 autos the robot shoots twice between three paths and runs its intake for most of the 20 s, so getting that timing wrong costs points every match.
Sequence, parallel, deadline
WPILib builds autos out of command groups. A sequence runs commands one after another. A parallel group runs them together and ends when all of them end. A deadline group runs them together and ends when one chosen command, the deadline, ends, canceling the rest. Following a path with the intake running is a deadline: the path ends the group, so the intake doesn't run forever.
Our TrenchBump-TrenchBump auto is a sequence: path 1, launch(), path 2, launch(), path 3. launch() is itself a short sequence: switch the robot to shooting, wait 2.5 s, switch back to idle.
When does the intake start?
Inside a path, there are three ways to say "start this now":
- By time. Choreo event markers are a time, in seconds, after one of the path's waypoints.
- By place. PathPlanner markers sit at a spot along the path. An event zone covers a stretch of it and is on while the robot is inside.
- By state. A trigger watches the robot itself: "within 0.3 m of the shot spot", "the sensor sees a game piece", "the shooter is at speed".
There's a catch with the second one. PathPlanner places a marker by position when you draw it, but when the path runs it turns that spot into a time on the plan and fires when the path's clock gets there. Choreo does the same. So both kinds of marker fire when the plan is at the spot, not when the robot is. The path command ends on that clock too, wherever the robot is.
Pick Time and turn on Slower plan. Then add the defender and try Place and State. Drag a ring to move a marker.
Starting the path.
Simplified: timed from the path start (Choreo times from a waypoint); the defender is illustrative. Path, markers and the 2.5 s shot are ours.
With our plan and nobody in the way, all three fire on the spot. Slow the plan to 2.5 m/s and a time marker still fires at the old 4.3 s, 1.0 m before its spot; a place marker gets its time worked out again from the new plan and stays put. That's the reason to draw markers by place: change a speed limit and they don't have to be moved.
A defender is different, because the plan doesn't know about it. The robot falls 1.6 m behind, and time and place markers both fire 1.6 m early. Only the state trigger waits until the robot is there. But a state trigger can also wait forever: make the defender slower and the path ends on its clock before the robot reaches the spot, so a trigger with nothing else behind it never fires.
The one thing to remember Event markers, by time or by place, fire when the plan reaches them. If the robot might be somewhere else, use a trigger on what the robot is actually doing, and give it a way out.
Next: Autos that react ↓
Autos that react
Driving to the piece that is really there, giving up on an empty spot, and lining up to score.
Every auto so far drives a plan made before the match. That works for things that don't move, like the hub. Game pieces do move: another robot's auto knocks them around, or one of ours pushes them on the way in. A path that drives through the mark with a 0.84 m wide robot can miss a piece that's half a meter away.
Seeing the piece
object detection on a camera finds game pieces in the image. From the piece's place in the frame and the camera's height and tilt, the robot works out where the piece is relative to itself: 1.8 m ahead, 0.3 m left. The Vision course covers cameras and how a pixel becomes a direction.
That measurement is from the robot, not from the field. If odometry thinks the robot is 10 cm left of where it is, a fixed path misses by 10 cm, but "the piece is 1.8 m ahead" is still right. Driving at what the camera sees fixes the robot's own error along with the piece's.
Driving to it
Two ways to get there. Drive to pose: point the robot at a target pose and let a controller close the gap, updating the target every loop as the camera sees the piece better. Pathfinding (chapter 5) plans a fresh path around obstacles from wherever the robot is. For a piece a couple of meters away with nothing in between, drive to pose is simpler and reacts faster.
Either way you need a fallback. If the spot is empty, the robot mustn't sit there looking. Give the search a timeout (half a second here), then skip to the next piece or go score what you have.
Switch to Fixed path and watch it miss. Set spot 2 to Empty for the timeout; New pieces reshuffles.
Starting.
Simplified: a perfect camera out to 2.5 m and a 45 cm intake reach (illustrative). Limits, spots and the scoring pose are from our first TrenchBump-TrenchBump path.
Pieces here land up to 1 m from their spot. A fixed path picks up about half of them; tracking gets all of them, for about 0.1 s more driving. With spot 2 empty, the tracking robot stops, looks for 0.5 s and heads back to score. Without that timeout it would wait at the spot until the auto ended.
Scoring at the end
The last move is lining up to score. By then odometry has drifted, 6 cm here and more after a bump. Near the hub the AprilTags are in view, so the robot corrects its pose and drives the last meter to the scoring pose on the corrected estimate. In the lab it stops within about 1 cm; on a real robot the tag noise makes it a few centimeters.
A robot that can shoot while moving doesn't have to stop at all. It aims from wherever it is, allowing for its own speed: a ball launched from a robot driving toward the hub at 2 m/s carries that 2 m/s with it, so the shot has to be softer or aimed off to one side.
The one thing to remember A plan says where things should be. To pick up what's really there, drive at what the camera sees, and always give the search a time limit and a next step.
1. Our auto’s paths and shots add up to 21 s. What happens in a 2026 match?
2. Another robot shoves ours 30 cm while it drives a path. With no vision, what does the follower do?
3. You drag a waypoint’s control point further out. What happens to the curve?
4. At the end of the first TrenchBump-TrenchBump path our robot drives at 180° but faces 135°. How?
5. Raising max velocity on the first TrenchBump-TrenchBump path from 3.5 to 4.5 m/s saves only 0.11 s. Why?
6. The robot is 10 cm behind where the plan says it should be. Our path follower’s translation kP is 4. What does it command?
7. After a messy pickup the robot is somewhere you didn’t plan for, with a robot between it and the scoring spot. Which tool gets it there?
8. We draw autos on the blue side. How does the same auto run on red in 2026?
9. A defender slows our robot on the way to the shot. Which way of starting shotPrep still fires at its spot?
10. A piece is 60 cm from its mark and odometry is 10 cm off. Why does tracking with a camera still get it?
11. The tracking robot reaches a pickup spot and sees nothing. What should the auto do?
That's the Paths & Autonomous course.
Next up: Telemetry, Logs and Replay, or head back to all courses.
