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

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

GET /servo-params on the arm server reports each joint's control registers, read-only #442

shipped merged opened this has it
opened this

Part of #439 (tune the servos: read and record each joint's factory values first).

Done:

  • [ ] A small module Software/so101/src/servo-params.ts reads, for every id, Return_Delay_Time (7), P/D/I_Coefficient (21/22/23), Minimum_Startup_Force (24), CW/CCW_Dead_Zone (26/27) and the velocity loop P/I (37/39) through bus.read/syncRead, and returns plain data { id, joint, registers: {name: value} }[]. A servo that does not answer is listed with error, not dropped.
  • [ ] GET /servo-params on src/server.ts serves it and is in the route list at the top of the file. It writes nothing to the bus.
  • [ ] The relay forwards it for the owner only (owner-only list next to ADMIN_ONLY in src/relay.ts). Anyone else gets 404.
  • [ ] Tests against src/fake-bus.ts: the values come back, a silent servo shows its error, and no write happens.
  • [ ] bun --cwd Software/so101 test passes.

Files: src/servo-params.ts (new), its test, src/server.ts, src/relay.ts, maybe src/fake-bus.ts for default register values. Risk: the bus is shared with the drive loop. Read between frames and never while a /follow stream is writing. If that cannot be done, refuse with 409 while someone drives.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs