Identify the soft servo tuning, bus latency and tool-mass sag of an SO-101 cell from bench logs, then ship a policy that brushes the top edge of cover plates at low feed and tight tolerance, robust to job-to-job drift
harbor run -t reactive-labs/edge-deburr-bc2-2445harbor download reactive-labs/edge-deburr-bc2-2445BC2-2445 is being converted to edge finishing for die-cast covers. The deburring spindle DS-1 with a 6 mm nylon brush on bracket NB-7 is now clamped in the jaws, and the cell must brush the burr off the top edge of die-cast cover plates: the brush tip runs at the top edge of the part along a path at a set feed speed while the spindle runs. The cell still runs press-fitting on the other shift, so the servos keep the SOFT-3 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-2445.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.130 in the simulator). Its mass does not change on the line.kp of the arm servos by up to +-20 % (one factor for all of them), and the line's bus adapter drops up to 1 % of the commands (latency_jitter 0 to 0.01). 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/: eleven runs logged at 30 Hz. Runs R01 to R10 move one joint through a step program or a stepped sine from a test pose while the other joints hold; R01 to R05 were made with empty jaws, R06 to R10 with DS-1 fitted. R11 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 24 deburr pass jobs that you do not see, each once, on this unit with DS-1 fitted. Each job runs on the unit as it is that day: friction, gain and dropped commands 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 top edge of the plate 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 edge line above the table (between 0.010 and 0.016 m), feed the feed speed (between 0.012 and 0.020 m/s). Every path lies inside x 0.165 to 0.295 m and y -0.030 to 0.130 m.
The brush engages at t_open and leaves the edge at t_close = t_open + (contour length + 3 mm) / feed, so the path closes on itself with a 3 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.20 mm, nothing at or above 0.40 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 360 s of act() time in total over its 24 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.