step.motion.path.passes¶
Compiler passes for the motion path pipeline.
Each pass is a callable transform from one IR node list to another. The default pipeline runs lowering → merge → corner-cut, with spline as an opt-in terminal transform.
- Public API:
LoweringPass, MergePass, CornerCutPass, SplineConversionPass — pass classes optimize_nodes(nodes, *, merge, corner_cut_m) — legacy helper
Submodules¶
- step.motion.path.passes.absolute_heading
- step.motion.path.passes.contract
- step.motion.path.passes.corner_cut
- step.motion.path.passes.decompose
- step.motion.path.passes.known_distance
- step.motion.path.passes.lowering
- step.motion.path.passes.merge
- step.motion.path.passes.resolve_heading
- step.motion.path.passes.spline
- step.motion.path.passes.to_absolute
- step.motion.path.passes.velocity_profile
Functions¶
|
Apply optimization passes to a flattened path node list. |
Package Contents¶
- step.motion.path.passes.optimize_nodes(nodes: list[step.motion.path.ir.PathNode | None], *, merge: bool, corner_cut_m: float) list[step.motion.path.ir.PathNode | None]¶
Apply optimization passes to a flattened path node list.
SideActionandNone(deferred) barriers are preserved and never optimized across — they pin the execution point of side effects and runtime-resolved steps.Passes (applied in order when enabled):
Merge (
merge=True): collapse adjacent same-type segments that have no conditions and known endpoints. Same-axis/same-direction linears sum their distances; consecutive turns sum their angles.Corner cut (
corner_cut_m > 0): replacelinear + turn + lineartriples withlinear + arc + linear. The arc radius is derived from the cut distance viaR = cut_m / tan(|θ| / 2).