Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

Letting go means go there: a release lands on the target instead of parking the arm short and snapping the model back #437

shipped merged opened this has it

Landed in pull #479 · 3 runs · run

opened this

Owner, 2026-10-21: "I'm tired of moving it then it kinda lagging then it snapping back. It's like I'm a fool just wasting my time… the positioning needs to feel like I'm in command."

Root cause (read in the code, main @ 037dab00).

  • Letting go of a drag or slider calls stream.end(), which closes /follow 250 ms later (viewer.html:850).
  • On that close, the arm server reads Present_Position and writes Goal_Position = present (server.ts:1278-1289).
  • The Governor limits the arm to 90°/s and 360°/s² (safety.ts:33-34), so after a quick drag the arm is still on its way. The close parks it short, often by 20-40°.
  • The page holds your target for 2000 ms (ui/intent.js:10). The arm never arrives, the hold expires, and the model and sliders jump to where the arm actually stopped. That is the snap-back.

Done when: letting go means "go there and stop", never "stop where you are".

  1. A clean release lands. The page sends a final {type:"release", seq, joints} with the last target, which nothing may coalesce away. The server lets the Governor finish to that target and closes or idles only after arrival (within 12 ticks) or after a timeout set by the remaining distance at current limits, plus 500 ms.
    • Only an abnormal close parks at present: a lost link, an e-stop, the turn ending, or over-limit.
    • STOP keeps its meaning: stop now, hold, and drop everything queued (see #434, which touches the same close and STOP code, so coordinate with Smith).
  2. The last frame is always sent. Frames flushes the newest target on release instead of waiting up to 33 ms, and flush is wired up (viewer.html:848 has it, nothing calls it).
  3. The intent hold follows the motion. It lasts the predicted time to arrival at the Governor's limits plus 300 ms, not a fixed 2000 ms. If the arm can't get there (a zone, a jam, a cap), the page says why, for example "held: the gripper would go below the table". No silent snap.
  4. The dead-man hold doesn't fire mid-gesture. holdAfterMs = 1000 parks the goal when frames stop, so a pointer that pauses still for 1 s mid-drag gets parked. Holding still while pressed should keep the target. Only losing the stream or the turn ends it.
  5. Tests, on the fake bus with the real Governor:
    • Drag 40° in 200 ms and release: the arm reaches the target within 12 ticks, no Goal = present write happens before arrival, and the model never moves away from the target.
    • A lost link during the move parks at present.
    • STOP during the move holds at once.
    • A press held still for 3 s keeps the target.

Pairs with the precision scorecard (#436), which will show the snap-back count dropping to zero.

2 earlier comments
commented

Owner, 2026-10-21 16:05Z: "the arm movement seems to be improving but still bugs out when there is a super fast snappy movement." Likely causes, from the code trace: maxStep = 400 ticks drops any frame that jumps further than that from the last target (server.ts ~1156) and only eases after 20 drops; frames older than MAX_AGE_MS = 200 are dropped silently (command-gate.ts:186); and the Governor caps at 90°/s and 360°/s². A fast flick should be followed along the Governor profile, never dropped. Add a test: a 90° flick in 100 ms ends at the target, with no frames dropped by maxStep.

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try (pull #460 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Steward bug hunt, 2026-10-21 (fake bus with servo dynamics, bench/motion.ts scorecard). Fixes found for this issue: a release finishes to the last target (close code 4410; a bare close still holds; STOP, e-stop and turn-end still hold at once); the maxStep drop is removed, so far jumps follow the Governor profile; the slow 300 ticks/s first-frame ease is gone; and the intent hold equals predicted travel time plus 600 ms. Before → after: the 90° flick went from 938 ticks short with a model snap-back to 0; release mid-motion from 711 ticks short to 0. The cost is +15 ms to first motion. It is being rebased onto main and will arrive as a steward pull. Vesper: don't duplicate this; review that pull when it opens. Real-arm part already done by the steward: servo P/I tuning (see #439), which removed the 2.4° settle error.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs