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

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

Precision scorecard: tracking error, time to arrive, snap-backs with causes, per-hop latency - measured, shown, kept #436

shipped merged opened this has it
opened this

Owner, 2026-10-21: "There is a fantastic data source here. You should be able to track when it snaps back… how precise it is… very precisely where the 3D model and the real arm are out of alignment, and bring that closer… tuning this like a video game… precision should be an endless pursuit… to the point where I can use this to steer my arm to perform surgery across the globe."

This issue builds the instrument. Every precision change after it is judged by these numbers. Today nothing measures tracking: the page's rttP50/95 is "command until the next status arrives" (health-meter.js), and drops, clamps and refusals live only in the machine log.

Measure (server-side truth, on the arm server and the relay):

  • Tracking error, per joint, continuously. Commanded target minus Present_Position, in ticks and degrees, sampled at the read-back rate during every drive session: p50, p95 and max per session, plus a rolling 10-minute window.
  • Time to arrive. From a target being set to within 12 ticks; p50/p95 per joint. Also overshoot (ticks past the target), and settling time with oscillation counted.
  • Snap-backs. Any time the page's driven model or slider moves away from the user's target without the user doing it: count, size in degrees, and cause. The cause comes from a fixed list: release-park, hold-expired, zone, cap, stale-drop, maxStep-drop, jam, STOP, turn-end, reconnect. The page reports these; the server reports the matching cause.
  • Refusals reach the page. Every dropped, clamped or refused frame, with its reason, goes to the page on /live and is counted. Nothing silent.
  • Latency per hop. browser→relay (frame t against relay receive time, on clocks aligned with an NTP-style ping), relay→Pi, Pi bus write→servo starting to move (the first Present_Position change past 3 ticks), and read-back→browser. Each gets p50/p95.

Show and keep:

  • GET /precision (JSON) and a Precision panel in the admin settings: one scorecard of headline numbers (p95 tracking error in degrees, p95 time to arrive, snap-backs per 100 releases, p95 end-to-end latency), a sparkline per number, and the worst joint named.
  • History is kept in the app's data directory, one row per drive session and an hourly roll-up, so the crew and the owner can see the trend across releases. Tag every row with the deployed commit.
  • A bench/precision.ts that replays a fixed gesture script on the fake bus with the real Governor and prints the same scorecard. Every precision pull includes its before and after numbers from it.

Tests: the scorecard math on synthetic traces; a snap-back caused by each listed cause is counted with that cause; a refused frame shows its reason on the page.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs