How our humanoid picks up and carries a 6 kg battery-cell jig without a trained policy
The robot walks to a pick cell, clamps a 6 kg Pin-JIG between two tools, lifts it, and carries it to its place position. This note explains how the behaviour is built, how we improved it in simulation, and where simulation misled us.
The task
A Pin-JIG is a fixture that holds battery cells. It weighs 6 kg and is too wide for one hand, so the robot has to carry it with both arms. It does not grasp the jig with fingers. Each arm carries a tool that slides under a rail and rises into a V-shaped groove, which we call a seat. Once both tools sit in their seats, the jig is clamped and can be lifted.
This is why we say the task goes beyond grasping. The robot has to make contact in the right place with two arms at once, share the load, and then walk with it.
| Robot | VR-H5-D humanoid, two arms, two Toolkep tools |
|---|---|
| Part | Pin-JIG, 6 kg, two V-groove seats |
| Control | A skill graph. No neural network decides the motion. |
Notation
Let \(T \in SE(3)\) be the true pose of the jig in the robot frame, and \(\hat{T}\) the pose estimated by perception. Arm \(i \in \{L, R\}\) has a tool tip at position \(p_i(q)\), given by the forward kinematics of the joint angles \(q\). Its seat sits at \(s_i(T)\), a point fixed in the jig frame. The seating error of arm \(i\) is
The pick counts as a success when both tools are seated and the lifted jig stays level, with tilt angle \(\theta\):
Step by step: what you see in the video
- Hold the body still. The legs, waist and head keep their pose. Only the two arms move, and they receive new joint targets 50 times per second.
- Find the jig. The depth camera in the head sees the jig, and we fit the jig's CAD model to the depth points. The output is a single pose: where the robot believes the jig is.
- Plan the arm motion. From that pose we compute six waypoints for both arms: approach from the side, line up with the slot, go under the rails, rise into the two seats, and lift.
- Seat the tools. Each tool must end up within 15 mm of its seat. If a tool catches under a rail, the robot lowers it, shifts it sideways, and pushes up again.
- Lift and tuck. Both arms raise the jig together and pull it close to the body. The robot then checks that the jig really left the station and hangs less than 3° tilted.
- Carry and place. The robot walks to the place position and lowers the jig into its slot.
Step 3 is an inverse-kinematics problem. The waypoints \(W_{i,k}\), \(k = 1,\dots,6\), are defined once in the jig frame, so the target of arm \(i\) in the robot frame is \(\hat{T}\,W_{i,k}\). For each waypoint we look for joint angles that bring both tools to their targets:
Notice that \eqref{eq:ik} uses the estimate \(\hat{T}\), not the true pose \(T\). The arms go where the robot believes the jig is. Keep this in mind for the section on the 2 cm error.
The idea: a skill graph instead of a trained policy
The six steps above are not learned from data. Each one is a small, named piece of code, a skill, such as "fit the CAD model" or "seat the tool". The skills are connected in a graph that says which skill runs after which, and what each one passes to the next.
We did not write this graph by hand. We follow a method called Graph-as-Policy (GaP), which works like this:
- Write. A language model composes the skills into a graph for the task.
- Rehearse. A simulator runs the graph on many variations of the scene.
- Edit. The failures go back to the language model, which changes the graph.
- Deploy. Once the graph works, it runs on the robot by itself. The language model is no longer involved.
We can write this down compactly. The policy is a directed graph \(G = (V, E)\). Each node \(v \in V\) is a skill, a function \(y_v = f_v(x_v;\, \phi_v)\) with parameters \(\phi_v\) such as offsets, speeds and thresholds. Each edge passes the output of one skill to the input of another. A scene \(\xi\) collects everything we vary: station position and height, lighting, depth noise. Running the graph on a scene gives an outcome \(c(G, \xi) \in \{0, 1\}\), which is 1 when the conditions in \eqref{eq:succ} hold. The loop then looks for the graph with the highest expected success,
and improves it one edit at a time, where \(\mathcal{F}_k\) are the failure traces of round \(k\):
For a factory cell this is attractive for three reasons. An engineer can open the graph and read it. It needs no demonstrations. And when something fails, the log names the skill that failed and shows its inputs, so a fix is a small change in a file that can be reviewed before it reaches the robot.
Improving the graph in simulation simulation
We ran this loop on our pick for ten rounds. In each round the graph was tested on \(N = 30\) new scenes and the language model made one edit, as in \eqref{eq:edit}. Between scenes we moved the station by up to ±35 mm and ±8°, changed its height, and varied colours, lighting and depth noise.
A lesson from this stage. The biggest improvement came from a single number. The tools were sent 5 mm too deep into the slot, so they caught on the rail and the robot had to retry the seating. Setting that offset to zero made every tool seat on the first try. Note that the success rate alone could not reveal this, because the pick succeeded either way. We only found it because we also tracked the cycle time and how close each tool came to the 15 mm limit. If you tune a system like this, measure more than pass or fail.
The catch: simulation knew too much
After ten rounds the pick worked every time in simulation. On the real robot, each hand lands about 2 cm away from where the plan put it. Why the difference?
In simulation, the robot's estimate of the jig pose was accurate to 1 mm. We had varied where the jig is, but never the gap between where the jig is and where the robot thinks it is. On hardware that gap comes from camera calibration, the detector, and small offsets in each arm.
The equations make the problem visible. Write the estimate as the true pose plus a small error, \(\hat{T} = T \exp(\delta^{\wedge})\) with \(\delta \in \mathbb{R}^6\), and let \(b_i\) be the offset of arm \(i\) from imperfect kinematic calibration. Because the targets in \eqref{eq:ik} are built from \(\hat{T}\), a perfect controller still misses the seat by approximately
where the matrix \(A_i\) maps a pose error of the jig to a displacement of seat \(i\). Our rehearsal sampled the scene \(\xi\) in \eqref{eq:obj} but kept \(\delta \approx 0\) and \(b_i = 0\). The objective was therefore maximized in a region where \(e_i\) never comes close to \(\varepsilon\).
| Distance of a tool from its seat | Value |
|---|---|
| Perception error in simulation | ≤ 1 mm |
| A good, solid seating | 3 to 7 mm |
| Largest error that still succeeds | 15 mm |
| What we observe on hardware | about 20 mm per hand |
To see how much this matters, we added the same kind of error to the simulator and ran the pick without any contact feedback, simply following the plan. simulation
In formulas, the bar chart shows the success curve of the plan-only graph. Instead of the single number \(J(G)\) we now evaluate success as a function of the error size \(\sigma\):
A graph is robust when \(S_G(\sigma)\) stays high up to the error we expect on hardware, here \(\sigma \approx 20\) mm.
So the run in the video succeeds for two reasons: the skills that react to contact (the re-seating in step 4), and a cell that we calibrated carefully by hand. Better tuning of the open-loop motion would not have helped.
What we changed in the method
These findings led to five changes on top of Graph-as-Policy. Each one is labelled with how far it has been tested.
1. Rehearse the robot's own error, not only the scene built, tested in simulation
Every simulated scene now includes a perception error: a shift and rotation of the detected pose, a camera mounting error, and a separate offset for each arm. For every trial we record how far each tool missed its seat in three directions, and how close each success check came to failing. We then report success as a curve over error size, like the bar chart above, instead of one number.
This replaces objective \eqref{eq:obj} with the success curve \eqref{eq:curve}, and each trial logs the signed miss \(p_i - s_i\) along the slot, across it, and vertically.
2. Accept an edit only with evidence built, unit-tested
The original method keeps every edit the language model proposes. In our logs, one edit raised the score by loosening the very check that measures success. Now the checks are locked. We ask for several candidate edits that each change one thing, test them on the same scenes, and keep the best one only if it also wins on scenes it has never seen.
Let \(\hat{\Delta} = \hat{J}(G') - \hat{J}(G)\) be the gain of a candidate \(G'\), measured on the same held-out scenes for both graphs. The edit is accepted only if the gain is positive with confidence \(1 - \alpha\):
3. Feel before lifting first result in simulation
Before the lift, the robot presses into the seat for 0.6 s and reads the forces. That short press predicts a failed lift fairly well (AUC 0.78) and predicts an overload of the force limit (AUC 0.80). It tells us that something is wrong, but not yet what. A lift that simply follows the forces did not fix it, because the problem is already decided at the seat. The next skill to add is therefore a re-seat that the press triggers.
As a rule: let \(\varphi\) be the force and torque features measured during the press, and \(g(\varphi) \in [0, 1]\) the predicted probability that the lift fails. The graph gets a new branch,
4. Practice in a learned contact model open
Trial and error is slow: every edit costs many simulated runs and a call to the language model. We are training a differentiable model of the two arms, the tools and the jig in contact, so that numeric parameters can be tuned by gradient and the language model only decides the structure. The pipeline runs from end to end, but the model is not accurate enough yet. Its predictions correlate only 0.2 to 0.6 with the simulator on unseen picks. Building the known kinematics into the model is what raised this from zero. Next we will train with more data on GPU, with a clear criterion for when to stop.
The model predicts the next state of arms, tools and jig, \(x_{t+1} = f_\theta(x_t, u_t)\). Since \(f_\theta\) is differentiable, the numeric parameters \(\phi\) of the skills can follow the gradient of the predicted success \(\hat{J}_\theta\) instead of being found by trial and error:
5. A rule for when to trust simulation built, tested on a stand-in
Before a change goes to the robot, we estimate how wrong the simulator can be, using held-out hardware data and conformal prediction. If the predicted gain is larger than that error, we adopt the change. If not, we run paired trials on the robot. We tested the rule with a deliberately shifted simulator playing the role of the robot. It correctly refused to trust the weak model and left the decision to the paired trials.
Concretely, take \(n\) held-out cases where both the simulated gain \(\Delta^{\mathrm{sim}}_j\) and the real gain \(\Delta^{\mathrm{real}}_j\) are known, and compute the residuals \(r_j = |\Delta^{\mathrm{real}}_j - \Delta^{\mathrm{sim}}_j|\). Let \(\hat{q}\) be their \(\lceil (n+1)(1-\alpha) \rceil / n\) quantile. A new change with simulated gain \(\Delta^{\mathrm{sim}}\) is adopted without hardware trials only if
Summary of results
| Claim | Evidence today | Where |
|---|---|---|
| The graph picks, carries and places the jig | the run in the video | hardware |
| Rehearsal improves the pick | 57% → 100% in ten rounds, unseen scenes | simulation |
| Plan-only picking fails under real error | 94% → 2% from exact to 20 mm | simulation |
| A short press predicts failure | AUC 0.78 over 296 picks | simulation |
| A learned contact model speeds up tuning | not shown yet | open |
| Gains in simulation carry over to hardware | not measured yet | open |
What comes next
First, ten logged trials on the robot. For each one we will record the estimated pose, the measured pose, the distance of each tool to its seat, and the tilt of the pelvis. This tells us how much of the 2 cm a better camera calibration removes and how much needs a correction per arm. It also turns the bar chart above into a prediction of the real success rate, which the following ten trials can confirm or reject.
After that come the press-triggered re-seat and the contact model at larger scale. The goal is a robot that adapts a two-arm contact skill to a new part in minutes, with fewer than ten trials on hardware, and that can say how much error it tolerates.
Takeaways
- Readable policies are practical. A graph of named skills can do a real two-arm task, and you can debug it by reading it.
- Measure more than success. Cycle time and margins found a bug that the pass rate hid.
- Randomize what the robot believes. Varying the scene is not enough if perception stays perfect.
- Contact feedback beats tuning. At 2 cm of error, only the skills that react to contact keep the pick alive.