Skip to content

2.5 Replanner and auto runtime

The replanner detects drift and blends a new plan in, and the native auto runtime sequences routes, hooks and recoveries. This page is part of Core modules.

replanner: Drift detection + blend

The replanner wraps a follower, and each tick() updates physical route progress and checks enabled drift triggers and rate limits. The standard thresholds are 0.25 m and 0.1 s. A triggered plan uses the remaining vias/crossings and shared graph cache, then installs a new trajectory and follower on success.

Standard replanning is synchronous. With openingFirst(true) (opening_first(true), ReplanSettings::async_replan) configured, compute polls a worker result and keeps tracking the existing trajectory while that plan runs, and an auto runtime also plans a 3 m head of a leg whose via chain is longer than HEAD_TRIGGER_M (8 m) and takes the whole leg as a replan. Force-route planning also runs off-thread, and failed replans retain the existing follower and set failure diagnostics.

Three guards run ahead of ordinary drift handling, on the standalone Replanner and on a leg the auto runtime drives alike:

  • A clock step longer than 5 s either way is a clock jump. Every stored time moves by the jump less one 20 ms loop, so the leg carries on from where it was. The auto runtime moves its own timers the same way.
  • With replanning on, a single-tick pose change over 0.75 m is a relocalization. Output holds at zero until a replan from the new estimate installs, with no blend from the old reference, and a replan that finds no route releases the hold. With replanning off the leg keeps its reference.
  • A tick without a usable pose (any non-finite component) holds the leg as an alignment hold does. The robot is told to stop, the trajectory clock pauses where the loss began, and the stall watchdog, the alignment’s no-progress timer and an in-flight worker’s spawn time skip the held time. The loss’s ticks still land on the leg’s clock, so no length of loss reads as a clock jump. The auto runtime runs the timers that need no pose on real time through the loss: matchTime moments fire at their time, the leg’s SEGMENT_SECONDS and legacy FRACTION (a fraction of planned duration) triggers fire on the leg’s clock, the time since the leg started, which an alignment hold does not pause either, and a leg whose give-up time passes ends as missed, since no pose confirms an arrival, and runs its fail case. A give-up leaves the leg’s unreached triggers unfired, with a pose or without. The route then moves on as it would with a pose, starting the next leg from the last pose seen and at rest, and each leg it reaches holds the same way until a pose returns or its own give-up time passes. Position and progress conditions, arrival, the settle watchdog and the host’s endWhen and when answers wait for a pose, and no leg starts before the route’s first tick with one. The auto clock starts on the route’s first tick, with a pose or without one, so matchTime counts from the auto’s start however late the first pose arrives, and a moment due before it fires at its time. These rules reach the robot through every binding: tempo_auto_tick refuses only a non-finite clock, and the Java, Python and C++ TempoAuto pass a tick without a pose to the core with the firing buffer, sampling no leg endWhen, when or aim supplier for it, since the core reads no host answer on it. A Setlist run’s own endWhen and its whole-run run(Condition.when(...)) predicates run in the run step every loop, pose or not. A custom controller reads reference status 0, hold, and is paused for the loss. On the first tick with a pose the leg resumes from the speed the robot can have kept, its command before the loss less the leg’s acceleration over the loss, and the linear command ramps up from there at the leg’s acceleration, where each tick’s bound is the last command the ramp let through plus that acceleration over the tick. The ramp ends on a tick outside a blend whose command fits under it and has itself risen no faster since the tick before, so a blend whose command dips under the bound where its two commands point apart is held to it as they come back into line. Once the leg’s top speed has had time to build from the speed kept at its acceleration, and a blend window after that, it waits for no steady command and ends on the first tick whose command fits under it, so a robot whose replans keep opening blends is not held for the rest of the leg and the command never jumps as the ramp ends. Completion reads the last pose seen before the loss.

During a blend, output = alpha * new + (1 - alpha) * old, with alpha ramping from 0 to 1 over blend_duration_s. Both followers receive a reactive heading override. Tracking error and stall checks share an already-computed projection when their trigger gates permit it, and this does not change custom-follower semantics.

A fitted curve is cleared by certificate, not by sampling. A tangent circle route can use the graph’s full robot radius and 1 nm contact tolerance. Only a swept outline has a collision skin to restore when constructing its enclosing circle, and adding that skin to a point robot rejects a tangent graph chord. Other curve repairs retain the clearance buffer. Each cubic interval is enclosed by the capsule around its endpoint chord, enlarged by the furthest control-point deviation, and the whole interval is certified against every obstacle within that reach. An interval that cannot be certified is bisected to a fixed depth, and exhausting the depth sends the segment to spline repair for a graph chord. Repair splits each failing segment and its neighbours at their midpoints once, then lays each segment that still fails along its graph chord and fits the rest again, until every curve left is certified. A route that carries a handoff tangent at an end keeps splitting for up to six rounds first, so its end segment keeps the tangent its neighbour was planned to. The certificate checks the same subdivision the velocity profile uses, so both read one grid.

Before any of that, each automatic routing corner is rounded by a quadratic Bezier from a point on its incoming chord through the corner to a point on its outgoing chord, both a fraction of its shorter chord away. A larger fraction gives a larger least radius, c cos^2(theta/2) / sin(theta/2) for a cut c and turn theta, and so a faster corner at sqrt(a_lat * R). Each corner starts at 0.25, or at 0.45 where the speed limit 0.25 gives it is below the speed the robot could reach there by a factor of 1.2. That speed is the lesser of the leg’s top speed and what its acceleration gives from either end along the graph route. Closer than that, a grown corner still taken while accelerating spends the lateral share of the friction ellipse over a longer arc than its apex saves. A corner steps down the fractions 0.25, 0.125, 0.0625 and 0.03125 on its own when its curve, or a curved segment its knots bound, fails its certificate, and the other corners keep theirs. A corner beside an authored knot whose automatic handle can shorten, or beside a segment clear only in contact, steps down only to 0.25, below which the handle shortens instead. Two corners sharing a chord shrink together so the straight span between them keeps handles within twice its length. A leg that turns its body with an end or authored knot in contact, and any fit no corner’s cut answers, rounds every corner with one fraction from 0.25 down. On the leg-plan corpus this made 157 of 480 shipped-pack routes and 32 of 40 ten-leg autos faster, by 0.77% and 0.97% of drive time in all, and none of 1,920 routes per pack and 160 ten-leg autos per pack slower.

A span between a rounded corner and a fixed handoff tangent sizes its corner-side handle independently of the corner’s quadratic parameterization. If that short handle makes the span’s endpoint curvature exceed the corner’s, a candidate grows until the magnitudes match or the handle reaches the span’s chord length. It is accepted only when Bernstein coefficient bounds certify that its curvature over the entire span stays below the short span’s join curvature, a lower bound on the short span’s maximum. The bound subdivides at most 32 intervals and retains the short handle when any interval remains uncertified. The corner curve and both tangent directions stay fixed. The speed profile normalizes each segment’s derivative, so the different parameter speeds preserve velocity direction at the join. Handles at automatic graph knots stay coupled to local clearance repair.

The span from a rounded corner to an authored waypoint or a route end with an automatic handle sizes its corner-side handle the same way when the short handle slows the robot. Its target is the larger of the corner’s curvature and the curvature the lateral or steering-rate limit allows at the speed the robot can reach at that corner (corner_free_curvatures, the estimate corner growth uses). It grows only when the join exceeds that curvature by 1.44, the square of the 1.2 growth margin. Below that curvature a longer handle only lengthens the span. Where the single-turn replacement described below can replace the corner and the span, the handle keeps its length and that replacement is offered instead. On REBUILT 2026 with the editor’s default robot, a route from (2.076, 5.478) through the upper trench to (9.121, 5.979) and on to (7.365, 3.451) hooks 2.7 1/m just past the trench exit with the 1.06 m corner handle, capping the robot at 2.01 m/s. The sized handle keeps it above 4.95 m/s there and shortens the leg from 2.262 s to 2.083 s, the same on both trenches of both alliances (trench_exit_span_keeps_speed_before_a_sharp_waypoint, 2026-10-31). The turn-merge speed and acceleration sweeps remain no slower than their baselines. Every fitted span still passes the spline clearance certificate.

A rounded graph corner followed by an authored turn can introduce an inflection at its exit, because the corner follows its outgoing graph chord while the next span bows away from that chord to reach the authored tangent. The fitter can join the two spans into one cubic, preserving the authored tangent and its endpoint curvature. Bernstein bounds require the replacement to turn in one direction throughout and keep its curvature below the original span’s join curvature. The whole replacement must pass the same swept-body clearance certificate. Authored knots remain in place, repeated targets share their predecessor’s knot and timing receipt, and wholly stationary plans retain their timed heading profile.

For a complete uncrossed holonomic circle leg with no interior authored vias or tighter endpoint speed caps and a tangent span between automatic corners, the fitter retains the graph-knot repair when it bows clear of every tangent span. That clearance allows for tracking error and reactive headings, and clearance checks reuse the sweep context’s obstacle bounds.

When the repair also retains contact, the fitter compares complete velocity profiles, and tight rounded corners can be slower than the repair. The first reachability passes give lower bounds on duration. A valid complete profile below the other bound rules out that candidate before its interval constraints and heading timing run. When both bounds are available, the fitter profiles the smaller one first and resumes each bound’s sample grid and passes. The selected profile is reused. The fit cache key includes heading limits, starting rate, and whether the complete route’s endpoint caps permit profile comparison, and the fitter and cache use the same test. Targeted crossing approaches retain the buffer because contact starts a crossing and requires the crossing heading to be aligned.

Method on ReplannerResult
tick(current_pose, now_s)ChassisSpeeds
tick_with_override(current_pose, now_s, heading_override_rad)ChassisSpeeds
compute(current_pose, now_s, heading_override_rad)ChassisSpeeds
target_state(now_s)TrajectoryState
is_complete(now_s)bool
sampled_poses(count: usize)Vec<Pose2d>

current_pose is a Pose2d, now_s is the runtime clock in seconds (f64) and heading_override_rad is Option<f64> in radians.

tick is the normal control path. Wrapper-side custom followers and output filters use compute to obtain Tempo’s built-in command and target_state to obtain the planned reference before producing their final command.

The replanner also tracks physical progress through ordered crossings. Each crossing has two latches. cross_entered[i] sets once the robot has been inside any terrain copy sharing that crossing’s id, and cross_passed[i] sets once it has exited after entering. When a crossing is passed, replans clear its Crossing.anchor flag, so a replan from a post-cross pose does not thread vias back through the bump or onto the opposite alliance’s mirror copy. The cross mask and terrain speed caps stay active regardless, so a robot shoved back onto the terrain can still plan from where it stands. A crossing without a target owes the leg until cross_entered[i] sets or a third latch, cross_reached[i], does. That latch sets when the robot’s center, between one pose and the next, passed within CROSSING_EDGE_REACH_M (0.05 m) of the terrain. A leg whose straight line misses the terrain is planned through the edge point nearest that line (crossing_vias at zero depth), so the planned center only touches the terrain there. Counting only poses inside, a leg from (3.0, 7.30) to (0.65, 4.87) crossing the REBUILT depot at its corner waited out the settle watchdog 1.1 s past arrival with a perfect follower and ended as missed (crossing_at_an_edge.rs, 2026-11-01). cross_reached meets the obligation only, and anchors, rejoins and the passed test read cross_entered.

A replan starts from the live pose, heading and turn rate and ends on the heading the leg ends on. A leg that names no keyframes holds its start heading until a crossing with a heading, turns to that heading for the terrain and holds it from there, so its replans end on the last crossing heading, else on the start heading. The interrupted-reference rebuild in auto_runtime, and the end keyframe a plan under an angular acceleration limit gets when the robot enters such a leg off its heading, take the same end heading. The bindings chain the legs after it from its start heading, but the runtime starts those that start there at the crossing heading instead, up to and including the first that turns on its own. Keyframes, Rotation Locks and planned aims the robot has not passed keep their places along the path.

A robot nearing a targeted crossing off its heading stops and turns where it can still stop short of the terrain: the leg’s top speed braked at its acceleration, plus that speed over the drivetrain lag the route measured (else the stated follower latency), plus 0.15 m. A crossing that fails on the terrain names the cause: the robot’s center more than 0.10 m beside the crossing’s line before it entered, its heading more than 0.05 rad off the crossing’s heading, or the terrain reached without passing the start of the line.

auto_runtime: Route sequencing

The module handles route progression, prepared plans, hook/event queues and replanner handoffs for Composer autos, and host bindings supply live predicates and command callbacks. Every route uses the Rust sequencer and there is no host sequencer fallback. Warmup prepares a plan without advancing runtime clocks or firing hooks. Native pose queries write only the requested prefix while preserving the full per-unit sampling grid.

A runtime takes a route in two halves. drive_model::ResolvedConfig, read once per configuration (tempo.route-config/v1), holds the route settings block, each Speed level’s limits (each a Result, so a level the drive model cannot give refuses only where it is read), the angular caps, the drive’s acceleration at each speed where every drive group has a motor model, the track width, the terrain caps and the drivetrain kind. route_json writes that curve as the config block’s driveAcceleration, which every leg’s constraints carry. RouteTemplate, read once per authored route (tempo.authored-route/v1), holds the legs with their Speed levels, missing track widths and crossing caps left as slots, and does not depend on the configuration, pack or alliance. resolve fills the slots in leg order (levels, then the angular caps, then track widths) and gives what AutoRuntime::new takes. route_from_json splits a serialized route into the same two halves and goes through resolve, so a route reads the same either way (tests/route_config.rs checks every recorded sequencing route), and route_json writes the serialized route a pair stands for. RouteTemplate::connector makes a Setlist’s drive to a route’s start from that route’s template and a configuration, the leg the connector authoring op writes.

A Setlist’s to(target) step reaches the core as a route with no authored start, the same as a Tempo.to route: the binding names the live pose as the start when the run begins, and the runtime plans its one leg from there. The core has no separate entry for the step and makes no connector for it (Wrapper conventions).

A segment’s optional arriveWith object hands its arrival to a host command, at atFraction of the progress Condition.progress reads or, without one, where the leg would end by arriving (in the tick or on the host’s arrival signal). AutoPhase::HandedOff commands zero, fires an ArriveWith reference once, and keeps the leg’s plan installed so its triggers keep firing and its look-ahead keeps building. The give-up time and endWhen still end the leg (a give-up records a miss and fires the fail case), and wedged() reads false. The host’s notify_handoff_done counts the command’s end as the leg arriving, so passed triggers fire, no miss is recorded, and the leg goes on to POST_BLOCKING. A leg that fails passes through POST_BLOCKING without waiting for its runAfter hooks (runs_after_hooks), and its fail case alone covers that ending. A leg fails when it gives up on its time, stalls (the host’s notify_segment_failed, or the core’s heading-stall watchdog), ends owing a required crossing, or has no route and is skipped. failed_segments records it and tempo_auto_failed_segments_v1 reports it, in its own additive boundary block. Failed is narrower than missed, because missed_segments also holds a leg whose clock ended it outside its arrival tolerance, which has not failed and still runs its runAfter. A leg ended by endWhen is neither. After a host signal that ends a failed leg, the core moves past its POST_BLOCKING at once (pass_failed_post_blocking), so no host ever sees the wait and starts the hooks. Construction turns a flowing junction after an arriveWith leg into a stop, and can_merge keeps the leg alone, so the next leg’s look-ahead plan starts at rest at the waypoint and is taken only within the look-ahead reuse distance (0.30 m) and heading tolerance of the live pose, and otherwise the leg plans from the live pose.

The look-ahead buffer (preplanAhead) plans each later planning unit from its expected start. The driving tick that reaches a unit fixes its inputs (config, expected handoff, the tick’s clock) and hands them to a worker thread, one unit per tick in drive order. A unit after one that starts at the live heading waits for that plan’s end heading. Later ticks take the trajectory in. A unit that finds no route drops the units asked for after it. The look-ahead the pose queries report fills some ticks after the ticks that ask for it.

The warm-up makes those look-ahead plans ahead of the auto (AutoRuntime::warm_later_groups). While the robot is disabled it plans each later unit. A unit after one that does not start at the live heading, whose own heading profile has no angular acceleration limit, starts from the authored end of the unit before, with that end’s authored heading. A unit that starts from the heading or the turn rate the unit before ends with waits for that unit’s warmed plan, then starts from its end (AutoRuntime::continue_later_groups). Later warm-up and progress calls carry the chain on, and a unit before with no plan leaves the rest to the look-ahead. The inputs, the junction speed and the entry turn rate included, are the ones the look-ahead asks with. A replay runtime makes the plans in place. A robot runtime hands them to the background workers in drive order as spare work (Lane::Spare), after the first leg’s plan. Spare plans take priority over every route’s construction bakes for up to eight dequeues while a bake waits, then one bake gets a turn. Look-ahead plans and replans keep priority over both. A spare run gives its worker back at its next cancellation check when one waits in the class’s queue. The job goes back in the queue to be made again from its inputs, its shared answers kept. A route whose first leg will not start at its authored start, such as a Setlist’s later route, warms its later units alone (AutoRuntime::warm_later_legs, tempo_auto_warm_later_legs_v1), with no plan of the first leg.

A route that keeps the robot’s own pose as it starts is warmed with that pose (AutoRuntime::warm_from, tempo_auto_warm_from_v1), called on every disabled loop with the pose the drivetrain reports and a clock. The call warms as warm does and also tracks the pose (LiveFirst): a first-order low-pass with a 0.25 s time constant (LIVE_POSE_SMOOTHING_S), and the place the low-passed pose last came to rest. Once it has rested for 0.5 s (LIVE_POSE_SETTLE_S) farther than half of first_plan_tolerance from the authored start and from the pose the last such plan was made from, a background worker plans the first leg from it as a look-ahead plan (PlanFor::RobotPose, the urgent worker’s only once a held leg waits on it), with the inputs the leg’s start would plan with (blocking_done_in_loop): the route’s, from that position, and from that heading where the plan starts from the robot’s heading. A route whose first waypoint names no heading (starts_free) is planned with the legs chained from its start heading carrying the robot’s, as carry_live_start_heading leaves them at the start; the route’s own segments keep their heading until then. One such plan is made at a time, no sooner than 1 s after the one before (LIVE_PLAN_INTERVAL_S), and it replaces the one before once it lands (LiveFirst::next). The plans are kept beside the first look-ahead slot, which keeps the plan from the authored start. As the first leg starts, choose_first_plan picks among the plans the robot stands within the first plan’s tolerance of, in heading too where the plan starts from the robot’s: a landed one before one still being made, then the one made from nearest the robot, the authored one where they tie. A chosen plan from the robot’s pose moves into the first look-ahead slot, with the heading it carried (first_plan_carried), and the others are dropped; from there the leg start is the one below, with first_plan_refusal judging the plan against the pose it was made from, and carry_live_start_heading keeping it for a robot within the heading tolerance of the heading it carried. A plan still being made is held for as the authored one is. Whatever drops the authored plan (discard_preplan(0): a flow request, an expected entry, a carried heading) drops these plans and the tracking. The later units’ warmed plans follow the plan from the authored start; where the plan the leg drove ends on another heading or turn rate, the look-ahead plans those units as it drives. A replay runtime, a route the robot flows into and a route whose start is the robot’s pose track nothing, and a worker that panics making the plan ends the tracking without poisoning the runtime. warm_progress counts the plans. On 2026-11-12, x86, 60 s of disabled loops with 2 cm of noise per axis on every loop and a 0.5 m jump for three loops every 5 s made one plan for a robot resting 10 cm off the start and none for one on it, and a robot carried at 0.5 m/s made none until it was set down (pose_jitter_and_jumps_plan_nothing_more, a_moving_robot_is_planned_from_once_it_rests).

The warm-up bakes every plan graph a plan of each unit can read (pathfinding::bake_plan_ahead): the key of the unit’s own heading and those of its turn retries (Replanner::graph_configs: held at the end heading, held at the start heading, and the turn with its holds off), for the terrain under either end of each leg, each with its barriers and convex pieces and every retry stage swept whole in the warm set of the plan’s inputs to the bit. A plan with those inputs then enters no key and makes no retry corner for itself, and any other plan plans as it would without the bake. A later unit’s bake runs just before its warm-up plan, on the thread that makes it. A robot’s first leg is planned first, alone on the urgent worker, and its bake follows as a background job of its own, listed with the route’s retry bakes (AutoRuntime::bake_first_leg_ahead), so the auto’s first tick cancels it and no leg waits on it, and the leg’s replans read what it baked. A replay runtime bakes the first leg in place before its plan, on the calling thread. The bake answers its own questions of the cache (worker_pool::unshared), so a run of the job made again finds what an earlier run baked instead of making it again, and it stops once the auto starts. The runtime holds the entries it baked, and wasm32 bakes nothing ahead. On the ten-leg autos of leg_plan_time.rs on a roboRIO, with every later unit planned ahead, the first leg’s plan lands as soon as without the bake, and the later units’ bakes add about 190 ms (shipped) and 300 ms (Field) per auto to the warm-up at the median, 1.1 s at most. The baked entries keep about 0.6 MB (shipped) and 0.9 MB (Field) more live per auto, 2.6 MB at most (2026-10-16).

When a driving tick requests a unit’s look-ahead plan, it takes the warmed plan only when it matches what a worker would build from the current request:

  • Its inputs match the look-ahead request bit for bit (WarmPreplan::serves): the same pack, the same start and expected-handoff poses, and every other config field written as its shortest round-trip decimal (write_plan_inputs, which names every field of ReplannerConfig, and a NaN input warms nothing).
  • Every recorded plan-cache lookup remains valid (PlanGraphCache::reads_stand). During planning, record_reads records the cache results shared by a planning job’s runs (CacheQuestion, KeptSlot): each entry a key found or inserted, each cached route, and each cached retry slot, wall-band candidate list and barrier of an entry. A key that found an entry must resolve to that same entry during validation. A key that found no entry must remain absent or resolve to one owned by the plan. The plan’s own entries include those it inserted and those it found already inserted with corners bit-identical to those it built. If another plan inserted different corners first, validation rejects the warmed plan. A cached route must match the one the plan used and refer to the same entry held by the record. If no route was cached, validation accepts only absence or a route created by the plan. A cached slot must contain the value the plan used, its own retry bake’s result, or the result of a bake with bit-identical inputs. In the last case, the entry’s set for those inputs must also hold the result (WarmRetries). The plan’s own entries, routes and slot values are what it would compute again from the same inputs. Other cached results are bit-identical to computing them directly. The check never waits for a lock held by another thread, including the lock on a retry bake’s record. A busy lock leaves the completed plan and its read record in a Validating look-ahead slot, and later driving ticks and a held leg start retry the check. Three busy checks request a worker plan, as does a check that rejects the reads, from the original look-ahead inputs and clock, retaining the request order. At one check per 20 ms tick, validation adds at most 40 ms before requesting a job, and checks within the same tick consume the same budget. A busy check requests the worker immediately when the leg’s remaining giveUpAfter is no more than two loop periods, using the larger of the observed period and 20 ms. Held time counts against that remaining budget, but an arrival pause before the leg does not. The worker can bypass optional route memos and retry slots, and a held leg can promote its job to the urgent worker. Replay has the same finite validation budget before waiting for the worker’s plan. The record holds the entries it read, so none is evicted while the warmed plan waits. An entry entered again after another plan at a heading within the key’s tolerance, or a retry slot another heading’s bake filled, fails the check.
  • It has completed. A warmed plan still being made is dropped, its job cancelled, and the look-ahead asks a worker for its own.

The plan taken is built at clock zero and moved to the leg’s clock as a look-ahead plan is (Replanner::rebase_time). The slot holds a completed look-ahead plan, and the leg start takes it by the look-ahead’s own rule. A unit whose inputs moved after the warm-up (a junction speed a plan lowered or stopped, an interrupted smooth junction, a heading carried from a reactive aim) or whose cache reads no longer stand gets the look-ahead’s own plan, and so does every unit of a route with preplanAhead 0. A leg after a connector, a leg that found no route, or a leg the look-ahead never reaches plans from the live pose. The warmed plans belong to the runtime, one per unit at most, freed as the look-ahead asks for each unit, when the auto ends, and by release_warm_preplans, and a warm-up called again before the auto starts asks for released ones again. first_plan_source (tempo_auto_first_plan_source_v1) reports what the first leg drove, decided at its blocking-done: the warm-up’s plan (FirstPlanSource::Warm), or a plan made as the auto started because no warmed plan was there, the offset or the heading was beyond the tolerance, the clearance did not fit, or the plan did not fit the robot’s motion. warm_progress (tempo_auto_warm_progress_v1) counts completed warm-up plans, and warm_no_route (tempo_auto_warm_no_route_v1) names the planning groups whose plan landed with no route. A first plan that found no route keeps its slot failed and is not asked for again by a later warm-up. On 2026-10-09, replay commands with warmed plans matched bit for bit against warm_without_later_legs on an independent cache and against the baseline build of the same day, over 40 ten-leg autos on each of the shipped and Field packs.

At a junction the robot tracked, the outgoing plan’s reference ends on the next unit’s planned start position to the bit, and on the junction’s speed to within 4 ulp of the speed recomputed from its reference velocity (629 of 637 handoffs over 40 ten-leg autos on each of the shipped and Field packs, 2026-10-09). Neither is an input of the adoption, because the look-ahead plans from the authored handoff, never from the reference or the measured pose.

A leg ends with its reference. The host reports an arrival whenever the robot is inside the leg’s tolerance, and the runtime takes it at once from a robot level with or ahead of the reference (no farther from the target than the reference is), and from a robot behind it once the reference has ended. Taking it earlier would cut the next leg’s reference forward by up to the tolerance in one loop, and leave the last leg’s robot moving when the route stops commanding it. A leg a host follower paces keeps no reference clock and arrives on the tolerance alone. A leg whose plan ends moving into the next is done once its reference has ended with the robot within the replan threshold of its end (Replanner::moving_handover_m), so the robot follows on into the next leg from where it tracks instead of turning back to touch the junction point.

A robot inside the tolerance of a leg that flows on is not taken while the reference, inside the tolerance as well, still turns onto the velocity it ends with by more than a join’s velocity step (FLOW_STEP_LOOPS loops of the acceleration limit, read by turn_carry). The next leg’s plan leaves along the junction’s tangent, so a handoff made before the arriving plan is on it leaves the robot moving another way; commands change by no more than the leg’s acceleration a loop and the reference accelerates at the same limit, so the robot stays behind by that step for the whole ramp. Field-pack auto 19 of the planning-time probe stood 0.41 m behind its reference that way (a leg turning 81 degrees in its last 5 cm, handed over 0.84 m/s off) and 0.02 m with the wait (2026-11-19).

The next leg’s plan is made a loop or two after the arrival, from the pose the robot then has, at the junction’s speed. It leaves along the junction’s tangent where that pose is within the arriving leg’s tolerance of the waypoint, and also where a robot passing at speed is still on the junction’s line and moving along it: within the tolerance to its side, along it within the tolerance plus the ground the junction’s speed covers in two loops (HANDOFF_LOOPS), and with its measured velocity no more than a join’s step (turn_carry) off the tangent at the junction’s speed. A robot on the line that moves another way, or whose motion is not known, gets no tangent. At 3.9 m/s a loop is 7.9 cm, more than a 5 cm tolerance, and a plan made 5.7 cm from the waypoint without the tangent left 21 degrees off the robot’s motion on shipped auto 15 of the probe (2026-11-19). A robot farther off than that plans from where it stands with no tangent, as one shoved off its route does.

A leg start checks that its leg has a route before the leg’s runBefore hooks run. A look-ahead plan proves it, and otherwise a trial plan from the leg’s start does, which skips the leg when it finds none. A planning group of several legs whose trial plan finds no route is split into its legs (AutoRuntime::split_group): each then plans alone, its junctions inside the group stopped, so the legs with a route drive, the leg with none is skipped as a leg of an ungrouped route is, and the leg after it plans from where the robot stands. The split costs plans only after a group’s plan has failed, and a robot runtime makes them on a worker while the leg start holds. The warm-up splits a group whose plan landed with no route the same way and plans its legs in drive order, a first group from the route’s authored start (AutoRuntime::warm_first_leg) and a later group once it has no retries left (AutoRuntime::continue_later_warm), so warm_no_route names a leg alone. A later group’s warm-up plan starts at the waypoint before it. Where the group before has no route the robot never reaches that waypoint, so a plan that fails from it says nothing of the group: the warm-up plans the group again from where the robot will stand once the group before is skipped, at rest (AutoRuntime::warm_from_stand), and only a group with no route from there is split or named. Every plan a worker has landed is taken in before a split is decided, the progress counted or a group named. A skipped leg that holds one heading is named with a quarter-turn heading at which it has a route, in a second line (AutoRuntime::say_fitting_heading, warning code legGaveUp). Finding the heading plans the leg again at up to four headings (Replanner::fitting_heading). A replay makes those plans on the tick that skips the leg. A robot runtime asks a background worker, so no control loop plans for the line: the worker says it on the console when it has the answer, whether or not the route still runs, and the route’s log takes it on the first loop after it lands. A route that is not ticked again, as one that ends on the skipped leg, has the line on the console only. A warm-up asks for none, and nothing is planned where neither the log’s warnings nor the console read the line. Over 60 seeded legs held at a heading that fits no gap on the 2026 field (x86, 2026-11-14), the loop that skips the leg took 0.62 ms at the median with the line’s plans on it and 0.33 ms without, the rest being its wait for the worker’s plan of the leg. A plan that loses its route at blocking-done fails on where the robot stands, and skips its leg without a split. A robot runtime’s look-ahead plan that finds no route goes on to the retries a leg’s plan makes (plan_leg_retries: stopped handoffs, then the waypoint bias shortened, clamped or left out), without making the failed plan again, and a warmed plan that found none asks a worker for those retries as the look-ahead reaches its group. A warm-up’s first plan falls back on them too (AutoRuntime::warm_first_leg). What the retries changed (PlanOutcome) is applied when the leg takes the plan, as for a leg’s own plan (AutoRuntime::apply_plan_outcome). Replay look-ahead plans stay the plain plan. A leg start whose plan does not land within its wait while the robot still moves coasts, and asks for a plan from the coast, except where the coast stops within the 5 cm reach and the leg’s heading tolerance of the plan already asked for, which it keeps (AutoRuntime::coast_keeps_ask), because the worker still making the first plan stops only at its next cancellation check, and the second plan would start where the first does. Blocking-done then drives the look-ahead plan when the robot stands within its reuse tolerance, the trial plan when nothing moved, or a plan from the pose it stands at. Each of these plans is plan_leg: the plan, again with a lowered exit speed while the route reaches the next junction slower, again from rest after an interrupted drive, and with stopped handoffs when a certified handoff curve is not reachable. It reads only inputs the tick fixes, and what it changes in the runtime (the junctions it stopped, the next junction’s speed) is applied when the runtime takes it.

AutoRuntimeConfig::planning_mode (route JSON config.planningMode; a route without it takes the TEMPO_PLANNING_MODE environment variable, else Robot, and an unrecognized value reads as Robot with one [Tempo] line) decides what the tick does with a plan that is not ready. Each binding names the mode from the config the route was built under (tests/fixtures/api/planningSettings.json). A stated PlanningConfigs.inBackground names robot for true and replay for false, on a real robot too. Unstated, a real robot (RobotBase.isReal()) names robot, so it never reads the variable, and elsewhere no mode is named. Each binding says once on the console when the config turns background planning off, and when a runtime outside a test plans in replay mode.

  • Robot, the default and what a robot runs: no tick plans.
    • Planning runs on the process-wide pool in worker_pool.rs. Bindings start it during Tempo.configure, and otherwise its first use starts it. Its two worker classes never trade jobs by changing priority, because Linux always lets a thread lower its priority, but raising it needs CAP_SYS_NICE or an RLIMIT_NICE that robot code (the roboRIO’s lvuser) lacks, and a thread at nice 19 beside a busy one at nice 0 gets about 1.5% of a core.
      • One urgent worker, under SCHED_BATCH at nice 0, runs the jobs a thread waits on (Lane::Now): leg plans, the junction negotiation, the first leg’s plan warm asks for, and every look-ahead plan a replay runtime asks for. Its weight is a normal thread’s, so threads at normal priority never starve it, and as a batch thread it never preempts a running thread as it wakes. It takes a share of a core only while a leg starts or holds, a replan runs late, or a disabled robot warms up. A worker started from a loop at real-time priority inherits that policy, so it leaves it.
      • Background workers, one on three cores or fewer and two on more, run look-ahead plans, replans, plan-graph bakes and spare plans (Lane::Ahead, Lane::Soon, Lane::Background, Lane::Spare), look-ahead plans and replans first. Spare plans precede bakes for up to eight dequeues while a bake waits, then one bake is taken. All background workers share this count, and live plans leave it unchanged. A spare run gives its worker to a look-ahead plan or replan queued behind it at its next check. Each drops to SCHED_BATCH at nice 19 as it starts, below a robot loop at normal priority and below one robot code raises to real-time priority, which a Linux thread would otherwise inherit. A batch thread never preempts its waker as it wakes.
      • A look-ahead plan a held leg comes to wait on, and a replan the follower has missed for two loops (REPLAN_URGENT_AFTER_MISSES), moves to the urgent worker (Ticket::urgent): taken from the background queue if no background worker has started it, and otherwise made again there from the inputs it captured, to the bit, when the background run has used under 2 ms of CPU or under a quarter of its core since it started. A run with its core is left to finish, and the idle urgent worker looks at it every 10 ms in case its worker is starved since. A job is made again at most once, the run that loses stops at its next check, and only one run lands its result.
      • An idle worker parks, and the loop wakes the class it hands a job to. A wait on a job never takes a lock a worker holds, because the result lands in a slot of its own behind a flag, which a real-time loop parks on and a normal one watches. A dropped ticket cancels its job. The job is skipped if no worker has reached it, and otherwise stopped at the next check (worker_pool::stop_if_cancelled), which planning makes at every node its graph searches take, each row of a graph build, each leg and fitted segment and before the speed profile, wherever it holds no shared memo. A job that panics lands as a fault, which poisons the runtime as a panicking tick does, and the next tick returns -1 with the panic message and a [Tempo] line says it. [Tempo] lines go to a chore thread of their own through a bounded channel, and a line that finds it backed up is dropped. A plan lands ready to drive. A look-ahead job builds the replanner and follower around its trajectory and a replan job builds the trajectory’s nearest-point index, so the tick only moves them into place. The followers and drives the loop is done with are dropped on the chore thread (worker_pool::retire). Where no worker can be started the leg holds and asks again each tick, and a replan keeps the follower on its reference.
    • LOOP_BUDGET (2 ms) limits how much time a runtime may spend waiting for plans. It is a target for total loop cost, not a hard execution deadline. Its tick and the host’s signals in the loop (entries whose clocks and wall times lie within half a loop of the loop’s first) share it. A tick that needs a plan waits on the worker’s channel for what the loop has left of it after the time spent so far, the work loops on the device do after their first wait (AFTER_WAIT, the most of the last four measured loops of each kind, 0.4 ms or more) and a margin for waking, 0.25 ms for a loop at real-time priority and 1 ms for one at normal priority, which the kernel can hold a millisecond behind the threads sharing its core. The wait is never longer than PLAN_WAIT_BUDGET (1.5 ms, lowered per route by config.planWaitS), and a plan that lands inside the wait is used on that tick. Otherwise a leg start holds until the plan lands, printing one [Tempo] line from a worker with how long it waited, and a replan leaves the follower on its reference. A hold before the blocking phase reads as WAITING, and one at blocking-done stays in the blocking phase. A route marked config.warmup, the throwaway the Java boot warm-up ticks from a pose that never moves, prints none of the lines on how its legs drove (a hold, a coast, a missed leg, a speed the drivetrain does not reach, advice on its junctions).
    • A robot still moving when its leg holds coasts (Coast). Each held tick slows the last command along its direction at the legs’ acceleration limit, never stepping it to zero, and slows its turn at their angular limit. The outline the legs on either side of the hold plan with, extensions included, is swept along the coast after the robot’s lag (the larger of followerLatencyS and one loop, run at speed). Where it would touch the field wall or anything the leg’s plan keeps clear of (the pack’s obstacles, the avoid zones, terrain neither leg crosses and the route’s custom obstacles) that the robot did not already touch, the coast slows harder, up to the grip limit the leg’s constraints carry (max_centripetal_mps2), to stop 2 cm short. It stops turning after the lag when the turn would still touch, and it brakes at the grip limit from the first held tick when nothing stops it in time. A [Tempo] line says so. The sweep is bounded by a broad phase over the run’s reach first and at most 160 placements a sweep. The plan it waits for starts from the coast: at the coasting speed and travel direction from where the robot is, for a leg the robot would have entered at speed, and from rest where the coast stops otherwise. A plan at speed leaves on a start handle as long as the robot’s speed (m for m/s). Where that start bends too tightly for the speed, the plan’s reference starts slower than the robot moves and the robot would refuse the plan a loop on (CoastingAsk::taken_next_loop, the take’s own checks for a robot that has run on at the coast’s velocity for one loop). The worker then plans the leg again along the same motion on the handle the leg’s junction negotiated (read as the leg starts and kept while the robot coasts out of the junction’s tolerance) and lands both plans (LegPlan::alternate). The tick that lands them reads each as the take does, at most nine reference states apiece, and goes on with the first where the robot takes it then, the second where it takes only that, and else the first (AutoRuntime::choose_landed), so a pair that lands late is judged against where the robot is and not where it was expected. The leg start’s next plan from the coast tries first the start its last plan left on. On auto 6 of the shipped pack’s ten-leg autos (2026-11-14) a robot 4.5 mm and 2e-5 rad off a plan with no heading slack coasted at 2.4 m/s. On the 2.4 m handle each plan left at 1.8 m/s and the robot refused 18 in a row, holding 380 ms until it had all but stopped. On the junction’s 4.9 m handle the plan leaves at the robot’s speed, and the hold is one loop on x86 and four on the bench roboRIO, where the first plan lands two loops late. A coasting robot takes a plan only once the velocity step from its last command fits the profiler’s longitudinal and lateral acceleration ellipse and its reference lies within the route’s default arrival tolerance (at most the 0.30 m look-ahead reuse tolerance). A moving reference that leads the braking robot can start up to one loop later, in eight bounded clock checks that enforce both adoption limits. The first commands ramp from the last held one within the same ellipse (Replanner::begin_departure_ramp) until the follower’s own command fits that ramp and itself moves within the limits. A plan at speed that misses is made again from the coast, and a plan from rest waits for the robot to slow.
    • The leg’s give-up clock (timeout_s) counts its held time, so a leg can give up during a hold and is missed as usual. A hold of 5 s of wall time (HOLD_WATCHDOG_S) without the pool passing a cancellation check or finishing a job waits on a worker that will not return, so the leg is skipped as one with no route and another urgent worker is started.
    • The warmed first plan, made from the route’s authored start or from the pose the disabled robot rested at (AutoRuntime::warm_from), and the first leg’s trial plan, made from the authored start, are taken within the route’s default arrival tolerance of the start they were made from (bounded by 0.30 m and 3 degrees, AutoRuntime::first_plan_tolerance), the tolerance a Setlist’s join takes as the robot being at a route’s start, and the follower closes the offset on that plan. Any offset in position, and a heading offset on a leg that starts at the live heading or follows a chosen turn, must fit, as d + r * |delta|, in the clearance the worker certified (Replanner::permits_start_offset): over the chords that begin within the follower’s latency plus three time constants of its slower proportional gain (start_offset_horizon_s, the whole leg for a differential base or a follower with no proportional gain), against each field wall, keep-in side and obstacle the plan comes closer to than its start footprint stands. One the plan never comes closer to does not bound the offset, since the robot really stands clear of it. A route that starts at the robot’s heading keeps its authored start heading, and the warmed plan, for a robot within that heading tolerance (AutoRuntime::carry_live_start_heading). Replay takes either plan only at the exact authored start. On 2026-11-01, over seven team routes (2556, 4774, CTRE, 2910) and four ten-leg autos on the qemu Cortex-A9 rig, a robot 1 to 5 cm or 1 to 3 degrees off the start drove the warmed plan on the enable tick on every team route but 2910 example_a, whose first leg turns half a circle beside the wall, and, offset in position, on one of the four ten-leg autos (the others turn in place beside a wall or start in contact), where it had waited one to three loops for a plan from the live pose, and full runs showed no new contact. Later look-ahead and trial plans are taken within the look-ahead’s 0.30 m position tolerance and the preceding leg’s heading arrival tolerance, bounded by the route default and 3 degrees, on legs that start at the live heading. A robot runtime takes a later look-ahead plan up to the preceding leg’s own heading arrival tolerance, at most 15 degrees (AutoRuntime::handoff_heading_tolerance, HANDOFF_HEADING_CAP_RAD), where the plan certifies the error (Replanner::permits_handoff, below). Turn rate must be within one loop’s angular acceleration. A held first leg retains its 0.01 rad heading tolerance (HELD_PROBE_HEADING_TOL_RAD) on legs that start at the live heading. A heading offset in a reused look-ahead plan, or a trial plan outside a flowing coast, also requires a swept-footprint clearance certificate. A coasting trial plan retains the moving-reference adoption checks above. The worker bounds each trajectory interpolation chord, including analytic heading motion between its samples, against obstacles, uncrossed terrain, avoid zones, custom obstacles, field walls and keep-ins. An additional heading error delta moves a footprint point by at most r * abs(delta), where r reaches its farthest effective corner, extensions included. The least remaining clearance across the entire leg bounds the error the follower may close. A robot runtime’s later look-ahead plan is also taken under a second certificate (ReuseClearance::permits_handoff): over the chords within the closing horizon, each read against the share of a start error the follower has left at that chord’s time (start_error_share, all of it through the follower latency, then e^(-k t) under the slower proportional gain k, bounded above by 1 / (1 + x + x^2/2 + x^3/6 + x^4/24) so every target computes the same bits), the heading error must fit the gap to each wall, keep-in and obstacle, and the offset plus the heading error’s reach must fit the clearance left where the plan comes closer than it starts, and 5% of the heading error (HORIZON_RESIDUAL, above e^-3) must still fit the whole leg. An error the follower closes before the plan’s tight places is then taken, and one beside a tight start is refused as before. Both certificates read the obstacles a plan made from the robot’s pose would have its poses checked against (Replanner::pose_obstacles): terrain under the plan’s end is left out, and terrain under its start is left out for a robot that stands on it by the same test (Replanner::stands_on_start_terrain). A plan with hard terrain under its start alone carries a second set of bounds with that terrain kept, read for a robot off it. On 2026-11-14, over 20 ten-leg autos on the shipped pack under the angular limits a binding writes (x86, two CPUs), 61 of the 191 leg starts with a plan made ahead refused it over a heading error of 6e-6 rad (median), and 66 and 67 with 1 cm and 0.5 degrees or 3 cm and 2 degrees of arrival error: 74 plans had no whole-leg heading slack, an end standing in an obstacle, past a field wall or on terrain. Leaving the terrain out gives 14 of them slack. A heading error inside the whole-leg slack is taken only with an offset that, with the error’s reach, fits the first certificate’s clearance (ReuseClearance::permits_held), so bounds of zero take the exact start alone; that refuses 3, 1 and 4 leg starts whose heading error fitted. In all 52, 54 and 58 refuse. The other 60 stand an end in contact with something a plan from the robot’s pose is checked against too, and no bound on the plan’s own distance from it holds a turned footprint’s corners while the follower closes the error (handoff_reuse_refuses_errors_that_turn_a_corner_into_what_the_plan_passes): those legs plan at the leg start. Adoption compares the offset with those stored bounds, and a failed certificate asks for a plan from the live pose. A robot runtime keeps the refused plan made ahead of a later group (StartJoin), and the worker making the leg’s plan first joins it where the robot stands (Replanner::join_at_leg_start), as a REJOIN_PATH replan joins its line where the robot stands: a robot at rest within REJOIN_ON_LINE_M (5 cm) of the plan before its first via, nothing between it and the plan, the join starting at the robot’s heading and turn rate, its turn onto the plan’s headings checked against the field, and the whole joined plan passing contact_sweep::first_entry. The joined plan starts on the plan made ahead, at the point nearest the robot, and the follower closes the robot’s offset from it as the robot drives on. The worker therefore takes the join only where the joined plan’s own bounds permit that offset and heading by the standard a plan made ahead is taken by (Replanner::permits_start_from, permits_handoff), under the gains in force, and plans the leg afresh otherwise: a robot 4 cm beside a plan that passes 5 mm under a block 0.5 m along joined, started 0.3 m from the block and stood 5 mm inside it 0.4 s on (a_join_is_taken_only_from_where_its_bounds_permit). The joined plan keeps the plan’s path from the join on and what taking the plan made ahead changes (PlanOutcome). A leg with aims or crossings, a differential base, a NEW_PATH route, a robot that flows into the leg moving, and a first group the route plans from its authored start plan the leg afresh, as does a join that does not hold or whose bounds do not permit the robot’s start. On 2556’s “Auto Side Test” (2026-11-03) the legs that end 0.5 to 5 cm and up to 1 degree off waypoints 3 cm from a wall, where no offset is certified, joined in 0.07 to 0.08 ms of x86 CPU against about 1 ms for the leg’s own plan; that was before the join’s bounds were read, and a join onto a plan with no certified offset is refused since (2026-11-14), so those legs plan afresh again (not measured on that route). Over 20 ten-leg autos a pack with no plan landing inside its tick, the bounds refuse 6 of the 10 joins that held on the shipped pack and 8 of 24 on the Field pack, each a robot 0.006 to 0.28 mm from a plan with every bound zero. Install products and flowing-coast probes do not prepare this certificate, because installation uses the new plan’s moving reference, without a fixed-clock heading offset.
    • AutoRuntime::warm hands the first plan to a worker and returns, so a warm-up called while the robot is enabled costs its thread nothing, and a first leg that starts before the plan lands holds for it.
    • A robot runtime negotiates its smooth junctions on a worker (JunctionWork), since negotiating them plans the routes between planning groups, 70 ms on a SystemCore for the leg-start probe’s smooth routes. Until they land the first leg holds at rest and warm warms nothing, so each binding’s route command calls warm again on every warm-up while disabled, which takes in the first plan once it lands. A negotiation the first leg holds for past the hold watchdog stops every junction.
  • Replay, for trace replay and deterministic tests: the tick plans in place or waits for the worker making a look-ahead plan, so each plan lands on the tick that asks for it and a run repeats tick for tick on any machine, and replans follow ReplanSettings::async_replan. The sequencing traces replay in this mode, the test suites set it through the environment variable, and each binding’s SimRun builds its runtime in it. A robot never runs it, because the wait stalls the loop for the plan’s length.

wasm32 has no threads and makes every plan in the tick in either mode.

Legs that stay separately timed but meet at a smooth junction negotiate that boundary before either is profiled. prepare_junction_plans produces a JunctionBlend per boundary: the shared endpoint tangent both plans fit to, and a boundary speed attainable under both neighbors’ limits. A leg receives them through ReplannerConfig::boundary_tangents. The tangent of a turning junction runs along the bisector of its chords and is as long as the longer chord (junction_tangent), and each leg’s fit shortens an unbiased boundary tangent to its own chord, so each side’s handle is bounded by its own chord. A handle held to the shorter chord curls the longer leg into the junction, with end curvature 4 L sin(theta) / |T|^2, and the negotiation lowers the junction’s speed to that curl.

A junction’s speed comes from the plans on either side of it. Any turn short of a reversal (junction_reverses, about 175 degrees, JUNCTION_REVERSAL_COS) takes the shared tangent and starts from the legs’ carry cap. Each plan’s profile lowers its end speed to what the curvature of its end allows under the centripetal limit, and the junction takes the lower of the two. A junction whose plans cross terrain routes no chords, so its tangent is the bisector of the way the first plans arrive and leave (plans_tangent). The handover between the two plans may step (handover_carry). A step in the direction of travel carries turn_carry of it within FLOW_STEP_LOOPS loops of the lower acceleration, and none on a differential base. A step in the heading reference carries any speed where no angular limit holds the heading, which then turns at once, and none under a turn-rate or angular acceleration limit. A step in the turn rate carries none under an angular acceleration limit. A group whose look-ahead plan starts from the plan before it (starts_from_plan_end) is negotiated from that plan’s end heading and turn rate (EntryHeading), as the look-ahead plans it, so under those limits the two meet without a step. A speed under one loop of the lower acceleration is a stop.

Once the junctions settle, each flowing junction compares the time of its two plans with the time of the same two plans meeting at rest without the tangent. Where the stop is faster, the shared tangent halves, up to TANGENT_SHRINKS times, and then the junction stops. A junction whose plans meet at rest keeps its tangent only where they are faster with it than along their chords. A junction beside one that changes compares again from its starting cap, taking back a tangent it set aside once. A plan that does not clear with tangents at both ends blames the end whose tangent alone keeps it from clearing, so a sharp corner that cannot be rounded does not take the next junction’s tangent with it. A collision falls back to a shorter tangent and then to the stop, never to a plan that touches. Every plan through a shared tangent is checked against the pack’s obstacles, the terrain it does not cross and the walls at its own outline every 5 ms (plan_touches), and one that enters any of them counts as a fit that collides, and a plan to or from rest that enters one is no alternative to flowing. Each round of comparisons that changes a junction restarts the pass window, up to one round per planning group. Waypoint biases are negotiated as before and are not compared.

A boundary that negotiation stops, or whose handoff pose lands outside the previous leg’s translation tolerance, drops its tangent and is rebuilt, so a displaced start cannot inherit a curve it no longer meets.

A route can end moving into the drive after it, a Setlist join treated as a junction between runtimes. AutoRuntime::flow_into takes a FlowTarget: the through fraction of the last waypoint’s arrival, the next route’s JSON and the connector settings, and the binding’s compareHeading and tolerances for the join. The bindings call AutoRuntime::flow_into_route instead, with a FlowRoute that names the next route as the core holds it (a RouteTemplate and the ResolvedConfig its runtime is built under) and whether it names a start heading. The next route resolves with no parse, and the connector comes from RouteTemplate::connector at the configuration’s Speed.FULL. Both reach the same probe (tests/route_flow.rs). The next drive is that route where the shared join rule (route_join::translation_offset, the same test the bindings make from the live pose and read from routeJoins.json, checked by tests/route_join_cases.rs) finds the last target at the next start, moving along the arriving chord with the last leg’s replanning threshold as the handover distance, and otherwise the one-leg connector the connector authoring op builds. A join at the start whose headings are compared and miss by more than the rotation tolerance ends at rest (differential bases compare translation only). The exit speed starts as the fraction times the lower top speed, capped by a positive authored end velocity. before is the last waypoint’s arriving bias or the previous target, and after is the next start’s bias, else the next first target, else the next start for a connector. A turn under 90 degrees arrives along the arriving chord, and a turn of 90 degrees or more, short of a reversal (junction_reverses), is rounded on the bisector of the two chords, as long as the longer one (ExitFlow::tangent), which the route’s last plan ends on and the next drive’s first plan leaves along. A reversal, or a speed no faster than one loop of the last leg’s acceleration (exit_floor), ends at rest, as do a last leg with runAfter, arriveWith, host pacing or a crossing heading stop, a next drive whose first leg stops to turn for a crossing’s heading, which plans that leg from rest (exitStops in routeJoins.json), and a next drive whose first leg has keep-ins, because a moving handover inside the arrival tolerance can leave a footprint from which no route stays inside them, which the authored start at rest does not (cpp_docs DocsSnippets.StayWithinKeepIns, 2026-10-26).

negotiate_exit then lowers the speed to what both sides reach: the route’s last planning group arriving along its authored chord or the rounding tangent, and a replay runtime of the next drive’s first group leaving through plan_leg_with and its bias fallbacks. The join keeps the speed only where those two plans are no slower than the same two plans meeting at rest, as a junction inside a route does, and otherwise ends at rest. A leaving plan that cannot hold the arriving direction plans without a tangent and turns onto its own way at a speed whose direction step 2 v sin(theta / 2) fits FLOW_STEP_LOOPS loops of the lower acceleration (flow_onto). A differential base, which cannot step its velocity sideways, leaves from rest instead (holonomic) unless its plan leaves along the robot’s motion. In robot mode a worker negotiates once the route’s own junctions settle, and the first leg’s hold and the warm-up wait for both. The last group’s preplans are dropped when the exit changes. A warm-up runtime never flows.

planned_exit reports the handover pose and velocity of the last plan, and expect_entry makes the next runtime’s group 0 plan from it ahead (plan_flowing_entry), again only when the handoff moves past EXPECT_AGAIN_M, EXPECT_AGAIN_RAD, half the join’s velocity step or half a loop of angular acceleration in turn rate. take_preplan adopts that plan within PREPLAN_REUSE_TOL_M and the heading tolerance, and where the step from the entry velocity to the plan’s start velocity fits the flow step (entry_steps_onto). flow_in lowers the entry to entry_cap (the first leg’s top speed and the speed the first group can stop from over its length) and seeds the next runtime’s first leg and coast from it. The output limiter steps from the lower of that and the installed plan’s start speed (first_command_entry), whose profile lowers its start speed for terrain, and a measured motion faster than that is lowered to it before it seeds the limiter. The first leg’s departure is checked against the entry in every curve mode, and a straight leg, which takes no tangent, reads the entry’s own direction (entry_departure_for). flowed_out also reports joins, so a binding runs the drive the core planned the exit for. flowed_out holds the last command’s velocity and the last leg’s moving handover distance, snapshotted as the route reaches DONE. is_complete reads true on that tick, so the host starts the next drive on the same loop, a mecanum route included, whose phase otherwise reports a finished route as driving until its command reaches zero. The tests are in rust/core/tests/route_flow.rs.

The editor’s routed preview makes the same joins. route_join_query in rust/wasm/src/lib.rs decides a join from the authored ends with route_join::translation_offset, heading_off, needs_connector, compares_heading and junction_turn_scale, as exit_probe does: whether the route ends moving, into the next route or into a drive to its start, and at what turn cap, and where it ends at rest whether the binding’s join test drives to the start. A routed request’s flow_out names that cap and the next drive’s request. The preview plans the route ending at the cap, plans the next drive’s first group leaving the join along the authored arriving chord through flow_onto, halving a departure it cannot plan up to four times as negotiate_exit does, and ends the route at the lower speed, at rest below the exit floor. A route the Setlist links ahead negotiates from its authored start at rest, as its runtime negotiates before the robot flows in, and a drive to a route’s start, built as the robot reaches it, negotiates from its entry (flow_out.with_entry). A first leg that holds a crossing heading starts at rest whatever the robot brings. The plan reports its end pose, velocity and turn rate (PreviewPlan::take_exit), which the next drive’s request takes as its entry. Its first group plans from there, leaving along the motion below entry_cap, starting from the entry heading where an angular acceleration limit or a targeted crossing makes the runtime start from the live heading. On the REEFSCAPE lane the preview’s exit velocity equals planned_exit’s to the bit (tests::joins in the wasm crate).

A robot nearing a targeted crossing off its heading stops and turns before the terrain (Replanner::compute, its control reference at status 2). The preview reads those stops off the core’s own drive. Each group whose crossings name a heading runs its plan through a Replanner and the runtime’s field-frame OutputLimiter, seeded from the plan’s start motion, on a lag-free sim (HoldSim), and the preview holds the plan’s clock where the drive holds, turning as the drive turns, then keeps the crossing heading until the plan reaches it. The sim spends a stepped preview’s facing budget a loop at a time and resumes where it stopped, over at most 120 s of plan and 5 s past it. On the REBUILT bump leg entered facing pi, the preview’s time is within two loops of the runtime’s.

The exit negotiation runs on the urgent worker (Lane::Now), never on the control loop, and a tick waits for it at most its plan-wait budget and holds otherwise. flow_profile_tests::profile_flowing_join_negotiation (ignored) times it. On the qemu Cortex-A9 rig it takes 13.7 ms for the first join of a process (the plan graph cold) and 0.3 to 2.3 ms after, on the REEFSCAPE 2025 pack’s lane (measured 2026-10-27).

esc

Loading search...