4.11 Planning
PlanningConfigs sets where plans run, whether autos are warmed while disabled, and
how many planning units a route keeps planned ahead. Pass it to withPlanning(...).
None of its values takes a supplier.
A planning unit is one leg planned on its own, or several legs in a row that share one trajectory. When legs that share a trajectory can’t be planned together, Tempo plans them one at a time and skips only the leg it can’t solve. The robot then stops at each waypoint between them.
PlanningConfigs
import com.tempo.config.PlanningConfigs;
PlanningConfigs planning = new PlanningConfigs()
.warmWhileDisabled(true)
.preplanAhead(2);from tempo import PlanningConfigs
planning = (PlanningConfigs()
.warm_while_disabled(True)
.preplan_ahead(2))#include <tempo/PlanningConfigs.h>
auto planning = tempo::PlanningConfigs{}
.warm_while_disabled(true)
.preplan_ahead(2);| Java | Python / C++ | Default |
|---|---|---|
inBackground(boolean) | in_background(b) | Not set. A robot then plans in the background, and simulation and tests follow TEMPO_PLANNING_MODE |
warmWhileDisabled(boolean) | warm_while_disabled(b) | true |
preplanAhead(int) | preplan_ahead(n) | 2 |
inBackground
With true, helper threads build routes and plans, and a leg whose plan isn’t ready
holds the robot until it is.
Planning after the start took a median of 13.7 ms per auto (34.3 ms max) on a roboRIO and 1.1 ms (2.8 ms) on a SystemCore. That was measured on 2026-10-09 across 40 ten-leg test autos whose warm-up planned only the first leg. The robot loop doesn’t wait for that time.
With false, the robot loop waits for each build and plan. The same inputs then give
the same run, loop for loop, but each wait stalls the loop. false prints this once,
when Tempo first plans a route (while it warms up, otherwise as it starts):
[Tempo] background planning is off: each plan and route build runs in the robot loop that needs it, and stalls that loop for as long as it takesTEMPO_PLANNING_MODE
When the config doesn’t call inBackground, Tempo reads the TEMPO_PLANNING_MODE environment
variable once per process. A real robot ignores it and plans in the background.
| Value | In simulation and tests |
|---|---|
not set, empty or robot | Plans in the background, the same as inBackground(true). |
replay | The robot loop waits for each build and plan, the same as inBackground(false). |
| anything else | Plans in the background and prints a line naming the value once. |
With replay, a robot program prints this once (tests don’t print it):
[Tempo] planning in replay mode: each plan is made in the tick that needs it, which stalls a robot loop for as long as the plan takes; for simulation onlyOn a real robot, replay prints
[Tempo] TEMPO_PLANNING_MODE=replay is ignored on a real robot, which plans in robot mode.
A config that calls inBackground(...) ignores the variable everywhere.
warmWhileDisabled
With true, Tempo builds every registered auto that is already
frozen on a helper thread when it’s
configured. An auto is built again when it freezes and after each run. While the robot is
disabled, each loop also plans a little more of the auto picked on a
TempoAutos chooser.
A route that doesn’t reset odometry is planned from the robot’s live pose once the pose has held still for half a second, and again if the robot is moved.
An auto that robot code has stopped warming drops its warmed plans after 50 disabled loops
spent warming other autos. Autos warmed together on every loop keep theirs, and so does the
auto picked on a TempoAutos chooser. When an auto starts, every other auto drops its
plans unless it was warmed on the last disabled loop that warmed any.
With false, none of that runs. Each auto’s first start builds its route and plans
its first leg, and the robot holds still until that plan is ready. A warm-up that robot code
asks for, with an auto’s warmup() or a TempoAutos.prePlan pick, still runs.
First-tick line
In Java, a route’s command prints one line on its first loop (The first tick):
[Tempo] first tick 0.812 ms (init 0.340 ms, odometry reset 0.096 ms, live plan, phase DRIVING)The words before phase say where the first leg’s plan came from:
| Plan token | Meaning |
|---|---|
warm-adopted plan | The first leg drives the plan warmed while disabled |
live plan (no warmed plan) | Nothing was warmed, or the warm plan hadn’t landed or found no route |
live plan (start offset beyond tolerance) | The robot was farther from the start than the route’s arrival tolerance. On a route that doesn’t reset odometry, it was also that far from where it sat while disabled |
live plan (clearance check failed) | The offset could bring the robot into something along the leg |
live plan (heading beyond tolerance) | The robot’s heading was farther from the start’s than the tolerance |
live plan (warmed plan did not fit the robot's motion) | The robot was moving or turning differently from the plan’s start |
live plan | Planned on this tick, before the leg started driving |
plan pending | The route is in a blocking or waiting phase, and the leg is planned when that phase ends |
no plan | No plan was made for this run |
phase DONE with no plan means the run had no drive plan, because the route was empty or
its plans failed.
preplanAhead
This is how many later planning units a route keeps planned while driving and warming.
With 0 each unit plans as it starts, and the robot holds still at each one until its plan
is ready. Larger values use more CPU and memory on the helper threads. A negative value
throws
[Tempo] the planning units kept ahead must be 0 or more; got -1. A Composer’s own
preplanAhead(n) overrides it for that route, and there a negative value clamps to 0.