holding-steady-while-other-arm-acts
Fix an object with one arm while the other arm works on it. The holding arm
is commanded only in hold and in release; nothing in between moves it.
Every robot call names its arm (arm_id).
The scripts (graph entry and exit)
hold(object_obb,holder_arm0,other_arm1,modegrip | press) routesholding/unreachable/hold_lostand outputshold, the recordactandreleasetake (arm ids, mode, the hand's read-back pose and jaw opening, its stand-off, the object's centre).act(hold,target,start,via,modemove | press,handas_is | closed | open) is the other arm's simple step; routesacted/unreachable. Any other skill can stand in its place: it just must not commandhold["arm"].release(hold, optionalstep_route+step_success, optional re-perceivedobject_obb) routesheld_and_released/hold_lost/unreachable; it always lets go and backs out.
The example subgraph wires hold → act → release (a failed hold ends the
subgraph there; a failed step still goes to release). To put another skill
between hold and release, make hold and release their own subgraphs: gap
accepts a subgraph exit only if the skill declares it, which is why holding
and acted are declared exits next to the three final ones.
The motion
- Two arms. Refuse (
unreachable) if the arm ids are equal, or if the other arm's pose reads as the holder's (within 1 mm) or as no pose: a connector that clamps or ignoresarm_idwould move the holder when told to move the other arm. - Hold, grip. Jaws open; top-down rotation from
robot.grasp_framewith the jaws closing across the box's narrower horizontal side (orclose_heading_deg), both wrist solutions tried at the stand-offpre_graspabove the hold pose; straight down to the tool centre at the object's centre height (grasp_height, never with the fingertips closer than 3 mm to its bottom face); close; jaws at the stop ishold_lost(opens and backs off). - Hold, press. Jaws closed; the tool centre is sent
press_depthbelow where the closed fingertips meet the object's top, after an IK preview of that pose (a stall at the edge of reach looks like contact). It must stop short of the target by at least half the press depth (it is on something), and by no more than press depth plus the reach tolerance, horizontally on target (orunreachable: something else is in the way). Gone all the way down ishold_lost. A position-controlled arm presses in proportion to the shortfall it keeps. - Act. The other arm sets its hand (
hand), takes the givenrotation, a top-down one forclose_heading_deg, or keeps its own; a free move tostart(default: where it is), straight legs throughviatotarget. Inmovemode every waypoint must be reached; inpressmode the last leg is previewed with IK and may stop short on contact (contact,stopped_short). It then backs out the way it came tostart, so the object is free of it before the holder lets go. The holder's pose is read before and after and reported (holder_shift). - Release. The holder's read-back pose is compared with the hold pose
(
pose_tolerance5 mm,angle_tolerance_deg5) and, gripping, its jaw opening with the one recorded at the hold (grip_tolerance0.03 of the span; at the stop is lost). For a press, a hand that sank shows as a pose change: the object left from under it. If a perception skill re-measured the object (object_obb), its centre must be withinobject_toleranceof where it was held. Then the jaws open (grip) and the hand goes straight back to its stand-off.
Inputs
object_obb: the held object's box, world frame (half-extents), from a perception skill.holder_arm(0),other_arm(1): the connector's arm ids.target,start,via: the other arm's tool-centre waypoints, world.object_obbtorelease(optional): the object's box re-perceived after the step; the only check that sees an object sliding in the jaws.- See the constants for the tolerances and distances.
Required end states
held_and_released: the holder's own readings did not change during the step and it let go. This is what the hand felt, not what the object did: a part sliding along the jaw pads (pushed across the closing axis) changes neither the jaw opening nor the hand's pose (measured below: a cube moved 16 mm in the jaws while the jaws changed by under 0.001 and the hand by 0.4 mm). Pass a re-perceivedobject_obbtoreleaseto catch that.hold_lost: seedetail; the holder is open (grip) and backed out.unreachable: seedetail; after a failed step the holder has let go.
The constants, and why
PRE_GRASP = 0.05m: RoboTwin put_object_cabinet grasps the held drawer bar withpre_grasp_dis=0.05.GRASP_HEIGHT = 0,FLOOR_CLEARANCE = 0.003m: jaws close at mid-height (RoboTwingrasp_dis0). The fingertip reach below the tool centre is thefinger_reachinput, else robot.describe_gripper's statedfinger.reach_m(a YAM linear_4310's is 10.2 mm), elsehand_geometry_unknown.PRESS_DEPTH = 0.010m: not in the source (it grasps); in the twin the hand stopped on the cube's top 10 mm short of it, as intended.GRIP_SETTLE_STEPS = 300: close_gripper'ssettle_stepsbefore the jaw opening is recorded; in the twin the jaws were still closing on a 30 mm cube after gap's default 60 (see the simulation check).REACH_TOLERANCE = 0.02m: arrival bound read back from each arm, no tighter than the servo's 4 mm or a real YAM station's 12 mm.EMPTY_FRACTION = 0.04: 3.8 mm on the YAM's 94 mm span: the stop plus verifying-grasps' 3 mm margin.POSE_TOLERANCE = 0.005m,ANGLE_TOLERANCE_DEG = 5,GRIP_TOLERANCE = 0.03: the holder is not commanded between hold and release, so these are displacements, not arrival bounds.
Connectors and arm_id
As handing-over-between-arms: RoboSimStudio's robot verbs take arm_id
(0 = work arm, 1 = support arm; an id past the last arm is clamped to it). The
real YAM station bridge (yam_real.py, 2026-11-06) drives the left arm
whatever arm_id says and reads no second arm's pose: hold refuses there
(unreachable, "no separate arm") rather than letting the "other arm" move
the holding hand.
Simulation check
RoboSimStudio YAM station twin, both YAM arms (bases 0.61 m apart; arm 0 =
left = holder, arm 1 = right = the other arm, moved by the harness to the
mirror of the left's working pose). The 30 mm, 15 g cube is placed between
the arms. hold with default parameters (grip; the harness passes the jaw
heading of the cube's x faces, 0.6 deg). act in press mode with
hand: closed and a top-down hand: free move to 50 mm off the cube's -y face
and 80 mm up, straight down to its tool centre 5 mm above the cube's centre,
then +y to a target set so that a free cube is pushed 2 cm (calibrated
without the hold). release was given the cube's box from sim.get_object_obb
in place of a re-perception skill. Three repeats each, the cube at x offsets
0, +3 and -3 mm; displacement from sim.get_object_obb; arm clearance from
the two arms' collision meshes every 20 ms (the twin does not collide the
arms with each other, so 0.0 means the meshes touch or overlap).
| run | routes (hold / act / release) | cube during the push | cube at the end (after release) | holder's own readings at release | min arm clearance |
|---|---|---|---|---|---|
| hold 1 | holding / acted / hold_lost | 16.0 mm, tipped up 4.3 mm, turned 17.7 deg | 10.1 mm from where it was held, turned 38.4 deg | moved 0.4 mm, jaws -0.0006 | 0.0 mm (left fingertip on right fingertip, during the push) |
| hold 2 | holding / acted / hold_lost | 16.1 mm, 4.5 mm, 17.7 deg | 10.1 mm, 38.7 deg | 0.4 mm, -0.0004 | 0.0 mm (same) |
| hold 3 | holding / acted / hold_lost | 16.3 mm, 4.5 mm, 18.3 deg | 10.1 mm, 38.0 deg | 0.4 mm, -0.0001 | 0.0 mm (same) |
| no hold 1 | - / acted / - | 19.6 mm, flat, 5.8 deg | 19.6 mm | - | 7.2 mm (parked left fingertip to right upper arm) |
| no hold 2 | - / acted / - | 19.7 mm, 4.3 deg | 19.7 mm | - | 6.9 mm |
| no hold 3 | - / acted / - | 19.9 mm, 4.0 deg | 19.9 mm | - | 7.3 mm |
What this says:
- The hold did not hold the cube still in the twin. With it, the 2 cm
push still moved the cube 16 mm (vs 19.6-19.9 mm free): the cube pivoted
and tipped between the pads (the push is across the jaws' closing axis, so
only pad friction resists it) while the holding arm itself moved 0.4 mm.
act's push is a position-controlled arm driven 2 cm into the object, far stronger than the grip's friction; the press reached its target (within the servo's 4 mm) every time, socontactread false. - The holder's own readings did not see it. Jaw opening changed by under
0.001 and the hand moved 0.4 mm: the cube slid and turned along the pads.
hold_lostcame from the re-perceived box alone (16.4-16.5 mm from where it was held). Without a re-perceptionreleasewould have answeredheld_and_releasedin all three runs. Wire a perception skill's box intorelease(object_obb) whenever the hold matters. - The hands touched. On a 30 mm cube the left's fingertips on its x faces
stand in the way of the right's closed hand on its -y face: minimum
clearance 0.0 mm in all three held runs (
left_tip_right/right_tip_left). Pushing a small held object from the side means pushing next to the holder's fingers; the skill does not check the actor's path against the holder (a planner skill with both arms in its world would). Turning the right hand 90 deg about its approach did not change it: the twin left the wrist roll unturned (PORTING lesson 10), so that run was the same as the unturned one. - Jaw settle. Calibration runs with gap's default 60 settle steps recorded
the hold at jaw opening 0.445 that later read 0.33 (the jaws were still
closing on the cube: 0.44 after 30 more steps, 0.42 after 90, 0.336 after
210), and
releasethen reported a jaw change of 0.11 ashold_lost; henceGRIP_SETTLE_STEPS = 300, after which the recorded opening was 0.334-0.335 in all runs. - Press hold, one run.
mode: press: the hand stopped 10 mm short of the press target (fingertips on the top) and the hold was recorded, but the press itself shifted the cube 4.6 mm; the push then moved it 25 mm and turned it 52 deg, and the holding hand was dragged 6.0 mm, soreleaseroutedhold_lostfrom the hand's own pose. The twin's servo does not keep pressing after the move ends, so a press is a weak hold there. sim.check_graspwas not used (it reads false in this twin).
Provenance
Adapted from RoboTwin's put_object_cabinet task
(envs/put_object_cabinet.py, MIT): one arm grasps the fixture (the drawer
bar, 0.05 m pre-grasp) and is left alone while the other arm works, and the
grippers are read at the end. Changed: a world-frame box from perception in
place of simulator actor poses; a top-down grasp or a closed-hand press
through robot.* tools with explicit arm_id in place of grasp_actor; the
other arm's work is a plain move or press (RoboTwin lifts and places the
object; any skill can go there); the hold is checked from the holder's own jaw
opening and pose before it lets go (the candidate's "joint tracking lag as a
slip signal" in the form a position-controlled arm can read back); refused
moves are routed. RoboTwin also pulls the drawer open with the holding arm
before the other arm acts; that pull is a separate skill
(planning-articulation-opening) and is not part of this one.


