Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
workbenchthis machine
src/limits-search.ts steps one joint's speed and acceleration up until p95 error or overshoot worsens, then backs off one step - orchestration and test only #494
Sign in to join this conversation.
Piece 1 of 2 of #469, the part a builder can do without the real arm. It follows the shape of
src/tuning-run.ts(#485).Done when:
Software/so101/src/limits-search.tsexportssearchLimits({ joint, steps }, deps).depsis{ isIdle(), sweep(joint) → { p95Error, overshoot, timeToArrive }, readLimits(joint) → { speedDegS, accelDegS2 }, writeLimits(joint, { speedDegS, accelDegS2 }) }.stepsis an ascending list of{ speedDegS, accelDegS2 }pairs, each inside theRANGESinsrc/safety.ts; a step outside them is refused before anything moves.isIdle()is false. It sweeps at today's limits, then writes each step and sweeps again. It stops at the first step where p95 error or overshoot is worse than the best so far, and writes back the last good step (today's limits if none was good).{ joint, from, to, runs: [{ step, result }], at }, which is plain data that a report can print.limits-search.test.ts, with a fakedeps, covers: refused while driving; a step outside the ranges refused before any write; the search stops at the first worse step and keeps the one before it; nothing good means today's limits are written back; a throw mid-search puts the starting limits back.bun --cwd Software/so101 testpasses.