step.motion.path.ir¶
Intermediate representation for the motion path pipeline.
Compiler passes operate on list[PathNode]:
Segment— one motion primitive (linear / turn / arc / follow_line / spline).SideAction— a non-motion step pinned to a transition point.None— placeholder for a deferred step resolved at runtime.
These types are intentionally pure data — they hold no robot reference and no runtime state. Anything stateful (current motion, world tracker) lives in the executor / middleware layer.
Attributes¶
Classes¶
One motion primitive extracted from a Step into the pipeline IR. |
|
A non-motion step pinned to a transition point in the path. |
Module Contents¶
- class step.motion.path.ir.Segment¶
One motion primitive extracted from a Step into the pipeline IR.
Field semantics depend on
kind:"linear"—axis,sign,distance_m,speed_scale,optional
heading_degandcondition.
"turn"—sign,angle_rad,speed_scale,optional
condition.
"arc"—radius_m,arc_angle_rad,speed_scale,lateral.
"crab_arc"—radius_m,arc_angle_rad,speed_scalepluscrab_from/crab_to(body-frame unit velocity directions at entry / exit). A constant-heading 90° corner blend for a holonomic base: the body velocity vector rotates fromcrab_fromtocrab_toover a quarter circle WITHOUT rotating the heading. Driven by a Python adapter (no warm-start unless profiled). Used bycut_cornersforforward↔strafecorners.
"follow_line"— same shape as"linear"plusopaque_step(the original LineFollow step). Adapter delegates lifecycle to the step’s
on_start/on_update.
"spline"—opaque_step(the SplinePath step). No warm-start."diagonal"—opaque_step(the DriveAngle step) plus the knownbody-frame displacement
forward_m/left_manddistance_m. Same opaque shape as a step; the travel direction is decoupled from the held heading. No warm-start.
- condition: step.condition.StopCondition | None = None¶
- class step.motion.path.ir.SideAction¶
A non-motion step pinned to a transition point in the path.
is_background=True→ fired as an asyncio task and not awaited inline.is_background=False→ awaited inline before the next segment starts.ephemeral=Truemarks a background task SCOPED to a parallel() spine — a non-spine branch ofparallel(motion_spine, branch). It runs concurrently with the spine but is JOINED at the next transition point (when the spine ends), preserving parallel()’s await-all semantics instead of leaking past its scope (which would, e.g., hold a servo while a later step tries to use it). A plainbackground()step is non-ephemeral — it persists until the path ends. Only meaningful together withis_background.- step: step.Step¶
- step.motion.path.ir.PathNode¶