Identify the soft servo tuning, bus latency and tool-mass sag of an SO-101 cell from bench logs, then ship a policy that lays a formed-in-place gasket bead along closed flange grooves with a heavy metering head, robust to job-to-job drift
harbor run -t reactive-labs/gasket-bead-bc2-2426harbor download reactive-labs/gasket-bead-bc2-2426BC2-2426 is being set up to dispense gaskets on pump covers. The sealant metering head MH-4 with a 30 ml cartridge on bracket NB-5 is now clamped in the jaws, and the cell must lay a formed-in-place gasket bead along the sealing groove of pump cover flanges: the nozzle tip runs 3 mm above the flange face along a path at a set feed speed while the head meters sealant. The cell still runs press-fitting on the other shift, so the servos keep the SOFT-4 compliance profile that press-fitting needs, and they will not be re-tuned. The program written from the drawing values does not work on this unit. Build a policy that does.
The cell, the simulator, the unit file format and the policy contract are described in /app/CELL_SHEET.md. The simulator is built to the drawing values. On this unit:
/app/data/unit_BC2-2426.json.kp, kv) and the joint friction (frictionloss) of the arm servos differ from the drawing, and the line's bus adapter may buffer commands (latency_steps). Joint damping, armature and force_limit are at their drawing values.payload_mass = 0.185 in the simulator). On the line the cartridge empties through the shift and is swapped when low, so the mass in the jaws is anywhere from 120 g to 240 g and nobody weighs it before a job.kp of the arm servos by up to +-10 % (one factor for all of them), and the line's bus adapter drops up to 2 % of the commands (latency_jitter 0 to 0.02). The bench runs below were made over about an hour while the servos warmed up, so they show some of this too.The records from the bench session are in /app/data/:
runs.csv and logs/: ten runs logged at 30 Hz. Runs R01 to R09 move one joint through a step program from a test pose while the other joints hold; R01 to R05 were made with empty jaws, R06 to R09 with MH-4 fitted. R10 is a dry run (tool fitted, process off) of the old program; dry_run_job.json is the job it was planned for. Each run starts from rest at its first goal. The log header explains the columns: the goal written to every servo at each tick and the position read back at the end of that tick, both in encoder counts.bench_notebook.txt: the technician's notebook for the session. Check the records against it before you trust them.Save the policy to /app/out/policy/ (policy.py defining class Policy, plus any files it loads), as set out in the cell sheet under "Deployed policies".
How the acceptance run works:
It runs 20 gasket bead jobs that you do not see, each once, on this unit with MH-4 fitted. Each job runs on the unit as it is that day: friction, gain, dropped commands and tool mass are drawn for each job from the ranges above. The tray and the target pad are off the table. Each episode starts with the arm holding the readings [0, -1.57, 1.57, 0.75, 1.57, 0] and lasts duration seconds.
Your policy sees only obs["t"] and obs["joints"] (encoder readings). reset(info) receives the job: {"episode": n, "contour": [[x, y], ...], "closed": true, "z": ..., "feed": ..., "t_open": 4.0, "t_close": ..., "duration": ...} in metres, metres per second and seconds. contour is the sealing groove as a closed polyline in the world frame (the last point joins back to the first). Arcs come as runs of short segments; a single vertex is a sharp corner. z is the height of the groove line above the table (between 0.012 and 0.020 m), feed the feed speed (between 0.015 and 0.025 m/s). Every path lies inside x 0.165 to 0.295 m and y -0.110 to 0.110 m.
The head starts metering at t_open and stops at t_close = t_open + (contour length + 6 mm) / feed, so the path closes on itself with a 6 mm overlap. The program expects the tool point (site gripperframe) at the contour point that lies at arc length feed x (t - t_open) from the first point of the contour, going in the listed order (past the end, it wraps around to the first point), at height z.
At the end of every tick of the process window (t_open <= t <= t_close) the acceptance run takes the tool point and measures, per job:
z). Full marks at or below 0.25 mm, nothing at or above 0.50 mm.Each measure is linear between its two limits. A job scores the lowest of the three. It scores 0 if the policy raised an error or broke a time limit, or if the jaw axis (the x axis of site gripperframe) tilted more than 10 deg from straight down at any tick of the window.
Reward = min(1, mean job score / 0.85).
Policy time: the acceptance run gives the policy 300 s of act() time in total over its 20 episodes, on top of the per-call and per-episode limits in /app/CELL_SHEET.md. Once that is used up, the remaining episodes fail.