is_holding · RoboTwin
The grasp-success oracle — decided from the gripper's OWN finger joints, no
vision, no attach. After every grasp/release, call this:
- told-to-close (gripper_cmd≈0) AND fingers wedged open (finger_opening>0.01):
holding=true — an object is between the fingers.
- told-to-close AND fingers met (finger_opening≈0): holding=false — grabbed air.
- told-to-open (gripper_cmd≈1): holding=false — the gripper isn't gripping.
finger_opening is the achieved joint separation (a can wedges the fingers to
~0.038 rad). This is read from the articulation qpos, NOT get_gripper_val —
that returns the commanded target (0 on any close) and reads 0 even while
holding, which is why the old visual fallback existed and false-positived.
The holding field can be trusted directly for precondition gating between
bimanual atomic transitions.