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

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

Netcode for the arm: 25 Hz actual position, the page predicts the arm, intent and actual marks on every slider #438

Closed opened this

Picked up by smith; no pull came of it (ok) · 4 runs · run

opened this

Owner: "at some point you might be tuning this like a video game." This is the netcode layer, and it needs #436's numbers to tune against.

Done when:

  1. Actual position at 25 Hz or faster, not 4 Hz. status() makes four serial syncReads, about 33 ms each (server.ts:549-552), and /watch runs every 250 ms. Read the contiguous block from Present_Position (56) through Temperature (63) in one syncRead, and push position on change at the bus cycle rate. Load and temperature can stay at 2 Hz. The relay forwards positions without its 200 ms batching (relay.ts:410).
  2. The page predicts what the arm will do. Run the same Governor profile on the page (shared code: safety.ts's trapezoid) from the last confirmed state. The driven model stays at your target (your command); a predicted arm moves along the profile. The blue ghost is the confirmed actual position, and the gap between predicted and actual is the honest error. Reconcile smoothly (server reconciliation, as in game netcode), never with a jump.
  3. Intent and actual marks on every slider, live (owner, earlier: "a mark with my intent and a mark for the actual position").
  4. Faster limits, measured. With #436 in place, raise maxSpeedDegS and maxAccelDegS2 per joint as far as the p95 tracking error and overshoot allow, and record the before and after numbers in the pull.
5 earlier comments
commented

Owner, 2026-10-21: "when watching the latency I do see it around 20-30 ms then jumps up to 200-300. Stable in the 10s would be amazing." The jumps match the status cadence: the page's lag figure is command until the next status, and status leaves the Pi every 250 ms (watchEveryMs) and the relay every 200 ms (relay.ts:410), so a reading that waits for the next status jumps by exactly that. Step 1 of this issue (one block read, positions pushed at the bus cycle, no relay batching) is the fix. Target: p95 under 20 ms for command to first confirmed motion on the LAN, with no sawtooth. And report it per hop (#436), so the number the owner sees is the real one.

commented

Taken over by @quill; stopped @smith.

commented

Parked by the crew: @quill's run ended without a pull: the pull closed

commented

Nothing new is pushed from this run. The branch already holds @quill's implementation of steps 1–3 (d419dd9), and it checks out clean.

On the branch, the type check shows no errors in the files that commit changed (the errors it does print are in other files, such as src/ui/zone-notes.js and src/visitor-counts.ts). bun test passes: 766 tests, 0 failures.

DECLINED: step 4 (raise maxSpeedDegS and maxAccelDegS2, with before and after numbers in the pull) needs the real arm and cannot be done from here. My sandbox cannot reach the Pi or run a measured tracking-error and overshoot sweep, and I will not publish guessed limits. The limits stay at 90 deg/s, as the README documents. The "p95 under 20 ms on the LAN, per hop" target also needs the live arm to confirm, so it is unverified.

What is already on the branch for the other steps:

  • Step 1 (position at the bus cycle): bus.ts has a new syncReadBlock, which reads the contiguous block of registers in one syncRead. /watch now ticks every 40 ms (25 Hz), and the relay pushes each status to the pages as it arrives instead of batching it every 200 ms. This removes the 250 ms and 200 ms cadences behind the 20–30 ms to 200–300 ms jumps in the lag figure.
  • Step 2 (the page predicts the arm): prediction.ts, safety.ts and ui/ghost.js carry the prediction. The blue ghost is the confirmed actual position.
  • Step 3 (intent and actual marks on every slider): viewer.html draws both marks on each slider.

Because forge.json declares a check, the forge's push check is the real verdict here, and it has not run on this branch. A person should run the step-4 sweep on the arm and set the limits from it.

commented

Parked by the crew: the run ended without a pull: no changes pushed: Nothing new is pushed from this run. The branch already holds @quill's implementation of steps 1–3 (d419dd9), and it checks out clean.

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. @quill's run ended without a pull: the pull closed
  2. the run ended without a pull: no changes pushed: Nothing new is pushed from this run. The branch already holds @quill's implementation of steps 1–3 (d419dd9), and it checks out clean

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Split. Steps 1–3 are on main in d419dd9 (#466): one block read at the bus cycle, the relay forwarding each status as it arrives, the page predicting the arm, and intent and actual marks on every slider. Both parked runs had nothing left to build except step 4, which needs the real arm.

Step 4 is now three issues:

  • #477: per-joint speed and acceleration limits, with defaults unchanged (ready).
  • #478: bench/limits-sweep.ts, a fixed sweep that can be rerun on the fake bus or the real arm (ready).
  • #469: raising the limits on the real arm with before and after numbers. It now waits on #477 and #478 and needs a person at the arm.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs