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

Migrated from github.com/Trevato/SO-ARM100

/admin 'Try this P' runs the tuning experiment on the arm while nobody drives and keeps every result in the precision history #497

Parked opened this
Closed without merging

The owner can now press "Try this P" on a joint in /admin. The arm server runs runPExperiment on it, and each result is kept in the precision history. bun test in Software/so101 passes (849 tests); tsc shows only errors that were already there (three erasableSyntaxOnly ones in other files, plus src/ui/ type errors).

Notes

stopped parked by the crew deploy 11dd096

opened this

The owner can now press "Try this P" on a joint in /admin. The arm server runs runPExperiment on it, and each result is kept in the precision history. bun test in Software/so101 passes (849 tests); tsc shows only errors that were already there (three erasableSyntaxOnly ones in other files, plus src/ui/ type errors). The forge's check on this push has not come back yet.

  • Route: POST /tuning/p {joint, p} returns 202 and runs in the background. A second run, or one while anything drives, gets 409, and an E-stop or hold gets 423. GET /tuning gives the phase of a run under way and the last outcome.
  • Sweep and writes: The sweep uses the same targets as bench/limits-sweep.ts. It goes through the server's own /follow stream, so the governor, zones and torque cap apply as they do for a person. P writes go through writeServoParams under the same driver claim as PUT /servo-params. If the old P can't be written back at once because a stream is still closing, the write retries for about 5 seconds.
  • History: Each result is stored in a new tunings table in precision.sqlite, tagged with the commit. It appears under tunings in GET /precision and in the admin Precision panel, newest first, as joint, P from→to, before→after and kept or put back.
  • Admin: Each Servos row has a "Try this P" field and button. The section shows run progress, the result, or the refusal as a sentence; the page has no script, so you reload to follow a run. The form posts to /admin with action tune-p, and the relay asks the arm server to run it.
  • Owner only: POST /tuning/p and GET /tuning are owner-only through the relay, and the admin form is too. Anyone else gets 404.
  • Safety: Safety limits, zones and the gripper torque cap are unchanged.

Two server options exist for tests: tuningHoldMs shortens the hold per target, and tuningSweep replaces the stream sweep with fixed numbers. The new src/tuning-endpoint.test.ts uses the fake bus for a run that keeps, a run that puts the value back, a second run getting 409 and a run refused while someone drives. It also has one run through the real stream, which checks the P that was left matches the result. The non-owner 404 is tested in src/admin-relay.test.ts, and the panel changes in the precision and servo panel tests.

I did not try it on a running instance. The Servos field is also not re-checked while someone drives. In that case the section shows only the notice and the run status, with no per-joint fields.

🤖 Generated with Claude Code

Closes #486

commented

The owner can now press "Try this P" on a joint in /admin. The arm server runs runPExperiment on it, and each result is kept in the precision history. bun test in Software/so101 passes (849 tests); tsc shows only errors that were already there (three erasableSyntaxOnly ones in other files, plus src/ui/ type errors). The forge's check on this push has not come back yet.

  • Route: POST /tuning/p {joint, p} returns 202 and runs in the background. A second run, or one while anything drives, gets 409, and an E-stop or hold gets 423. GET /tuning gives the phase of a run under way and the last outcome.
  • Sweep and writes: The sweep uses the same targets as bench/limits-sweep.ts. It goes through the server's own /follow stream, so the governor, zones and torque cap apply as they do for a person. P writes go through writeServoParams under the same driver claim as PUT /servo-params. If the old P can't be written back at once because a stream is still closing, the write retries for about 5 seconds.
  • History: Each result is stored in a new tunings table in precision.sqlite, tagged with the commit. It appears under tunings in GET /precision and in the admin Precision panel, newest first, as joint, P from→to, before→after and kept or put back.
  • Admin: Each Servos row has a "Try this P" field and button. The section shows run progress, the result, or the refusal as a sentence; the page has no script, so you reload to follow a run. The form posts to /admin with action tune-p, and the relay asks the arm server to run it.
  • Owner only: POST /tuning/p and GET /tuning are owner-only through the relay, and the admin form is too. Anyone else gets 404.
  • Safety: Safety limits, zones and the gripper torque cap are unchanged.

Two server options exist for tests: tuningHoldMs shortens the hold per target, and tuningSweep replaces the stream sweep with fixed numbers. The new src/tuning-endpoint.test.ts uses the fake bus for a run that keeps, a run that puts the value back, a second run getting 409 and a run refused while someone drives. It also has one run through the real stream, which checks the P that was left matches the result. The non-owner 404 is tested in src/admin-relay.test.ts, and the panel changes in the precision and servo panel tests.

I did not try it on a running instance. The Servos field is also not re-checked while someone drives. In that case the section shows only the notice and the run status, with no per-joint fields.

🤖 Generated with Claude Code

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs