feat(cam): emit jerk schedules as v0 .roo source #59

Merged
patman merged 1 commit from patman/cam-roo into main 2026-07-09 23:28:16 +00:00 AGit
Owner

PR8 of the adaptive-clearing roadmap: emit_jerk_schedule / emit_chained — JerkSegment sequences become complete v0 .roo programs (machine header + jerk (x,y,z) for t / hold for t statements per language-reference sec 2/5.2/5.3). Shortest-round-trip float formatting: reviewer verified emitted text reparses to bitwise-identical values and never produces exponent notation (and the grammar allows exponents anyway); golden test pins the exact program text. Emission is stricter than the in-memory type at the trust boundary: NaN/inf AND negative durations are rejected (NegativeDuration), -0 never leaks into text. Sub-dt residual durations (e.g. 1e-15 s bisection cruise) are emitted verbatim by design — dt is a machine property, quantization is Brain-side ceil(D/dt); documented. Stacked on patman/cam-lookahead (#58).

PR8 of the adaptive-clearing roadmap: emit_jerk_schedule / emit_chained — JerkSegment sequences become complete v0 .roo programs (machine header + jerk (x,y,z) for t / hold for t statements per language-reference sec 2/5.2/5.3). Shortest-round-trip float formatting: reviewer verified emitted text reparses to bitwise-identical values and never produces exponent notation (and the grammar allows exponents anyway); golden test pins the exact program text. Emission is stricter than the in-memory type at the trust boundary: NaN/inf AND negative durations are rejected (NegativeDuration), -0 never leaks into text. Sub-dt residual durations (e.g. 1e-15 s bisection cruise) are emitted verbatim by design — dt is a machine property, quantization is Brain-side ceil(D/dt); documented. Stacked on patman/cam-lookahead (#58).
Add CAM/plan/src/roo.rs: emit_jerk_schedule and emit_chained project a
scalar JerkSegment sequence onto a world-frame unit direction and
render it as a v0 .roo program (machine header, jerk/hold statements),
completing the CAM-precompute-to-interpreter-language bridge (PR8).
Numbers use Rust's default f64 Display so emitted text round-trips to
bit-identical values; zero-duration phases are skipped and all-zero-
jerk segments emit `hold` per the v0 grammar.

Co-authored-by: patman-assist <patrick-ai@kgroo.co>
patman changed target branch from patman/cam-lookahead to main 2026-07-09 23:28:14 +00:00
patman merged commit 9984bda960 into main 2026-07-09 23:28:16 +00:00
Sign in to join this conversation.
No description provided.