graspit-py: A Python Interface to GraspIt! for Grasp Planning Under Pose and Friction Uncertainty
Organizations: Department of Electrical and Computer Engineering and Institute for Systems Research, University of Maryland, 8223 Paint Branch Drive, College Park, MD, 20742, USA
Abstract
In simulated multifingered grasps, pose error can change contacts formed during hand closure, while friction uncertainty changes the loads supported by those contacts. Existing C++ APIs and ROS 1 services provide programmatic GraspIt! access but require native bindings or a service transport layer for Python use and application-specific integration of contact geometry with uncertainty sampling. A Python workflow for these studies must connect native closure and contacts to caller-defined wrench scores, uncertainty samples, and command reconstruction. We present graspit-py, a Python interface to native GraspIt! operations that supplies this workflow. The interface provides native scene access, contact-wrench analysis, and configurable approach planning under pose and friction uncertainty. A grasp record associates the object-relative palm pose and closed independent coordinates with nominal contacts and quality scores evaluated under sampled pose and friction conditions. Our MuJoCo exporter derives serial hinge chains and affine joint couplings, including nonzero reference angles, and preserves individual collision components. Across 75 configurations of five hand models, maximum discrepancy between source and exported palm-frame vertex sets was approximately 1.3 micrometers against a 100-micrometer geometry tolerance. We isolated reference-angle and collision-component effects through controlled ablations and validated 1,920 directional task-wrench capacity calculations against independent Cartesian-force linear programs. In a common GraspIt! workload, median reset-close-score-state cycle latency through direct Python was 10.7% lower than through persistent ROS 1 services. An executable export-plan-reconstruct workflow and grasp examples on six hand models demonstrate how the contact, score, and joint representations support numerical analysis and command reconstruction.
Figures & tables
| Public module | Input | Output |
|---|---|---|
| core.bindings | Robot and object models, hand pose, joint coordinates | Closure, object-frame contacts, native quality, collision and link queries |
| convert. mjcf_hand | Compiled MuJoCo model and selected palm or object subtree | GraspIt! XML and OFF meshes, with an affine source joint map for hand export |
| planning | Palm-frame geometry, approaches, preshapes, closing subset, constraints, and uncertainty parameters | Ranked records with object-relative palm poses, independent coordinates, contacts, and scores |
| kinematics | GraspIt! robot XML and independent coordinates | Link forward kinematics |
| grasp.quality , risk | Contacts and load directions, or weighted score samples | Wrench-space metrics, task load multiplier, and tail averages |
| utils.geometry , utils.urdf | Geometric data or a rigid URDF object with optional dependencies | Transforms, distances, or OFF/XML object models |
| Representation | Frame and Units | Interface Convention |
|---|---|---|
| Native palm pose | World frame; translation in mm | Quaternion ; pose query includes a nested matrix_row_major with four rows and four columns |
| Grasp-record palm pose | Object frame; translation in mm | T_object_hand_mm maps palm coordinates into object coordinates |
| Independent coordinates | Loaded hand’s native order; radians | Shared drivers can control several hinges |
| Object-side contacts | Object frame; positions in mm | position_mm and inward force normal |
| Native link queries | World frame; vertices in mm | Poses identify chain , link , and name |
| XML forward kinematics | Palm frame; XML distances typically mm | link_poses returns homogeneous transforms keyed by chain and link |
| Callable Family | Caller Supplies | Result or State Change |
|---|---|---|
| World loading and setters | Model paths, world-frame palm pose, independent coordinates | Shared native scene state; loading success Booleans |
| move_current_hand_ dof_to_contacts and traced variant | Desired coordinates and optional step sizes | Collision-aware coordinate motion; optional coordinate/collision-count trace |
| Grasp.compute , object_contact_geometry | Loaded hand, selected object, current closure | Refreshed grasp and object-frame contact dictionaries |
| Quasistatic solve and force queries | Current grasp | Solve status, availability, contact-frame wrenches and normal-force diagnostics |
| build_grasp_matrix , min_weight_force_closure | Common-frame contacts, center, friction, torque scale | Wrench matrix; min-weight optimum and force-closure predicate |
| load_chains , link_poses | Robot XML and independent coordinates | Palm-frame link transforms keyed by chain and link |
| Key | Serialized Type, Shape, and Units | Meaning |
|---|---|---|
| T_object_hand_mm | Nested float lists, ; translation in mm | Accepted nominal palm-to-object transform. |
| dofs_rad | Float list, length ; rad | Closed independent coordinates. |
| contacts | List of dictionaries with length-three float lists | Nominal object-frame position_mm (mm) and inward unit normal . |
| native_epsilon | Float | Native GraspIt! quality of the nominal closure. |
| nominal_epsilon | Float | Nominal-row recomputed quality at the middle friction node. |
| epsilon_samples | Nested float lists, | Recomputed Ferrari–Canny qualities over poses and friction nodes. |
| Hand | Coordinates | Links | Configurations | Source ( m) | Hull ( m) |
|---|---|---|---|---|---|
| RealHand L6 | 6 | 12 | 49 | ||
| LEAP | 16 | 17 | 4 | ||
| Ability | 6 | 11 | 12 | ||
| Shadow, palm | 18 | 23 | 5 | ||
| Inspire, right | 6 | 13 | 5 | 0.836 | 1.29 |
| Two-hinge model | 1 | 3 | 3 | — |
| Model | Links with added probes / compound links | Maximum added probes (%) | Added volume (cm 3 ) |
|---|---|---|---|
| Shadow | 1/5 | 25.8% | 68.2 |
| Inspire | 1/1 | 13.7% | 87.3 |
| U-shaped model | 1/1 | 56.0% | 60.5 |
| Quantity | Cases | Maximum discrepancy |
|---|---|---|
| Task-wrench capacity | 1,920 | |
| Analytic unit capacity | 18 | |
| Coordinate transformations | 960 | |
| Friction monotonicity | 1,440 | |
| Strict closure classification | 88 | — |
| Scaled min-weight classification | 448 | — |
| Operation | Direct Python | ROS 1 | Persistent ROS 1 |
|---|---|---|---|
| Startup (s) | 1.1226 [1.1198, 1.1256] | 1.2565 [1.2552, 1.2593] | 1.2579 [1.2569, 1.2583] |
| Object pose ( s) | 2.168 [2.140, 2.206] | 661.7 [612.2, 712.0] | 12.68 [12.28, 14.35] |
| Autograsp (ms) | 74.65 [74.47, 74.89] | 116.54 [114.73, 118.06] | 117.24 [116.08, 118.46] |
| Wrench scores (ms) | 75.01 [74.88, 75.16] | 43.53 [43.31, 43.90] | 43.77 [43.47, 44.04] |
| Complete cycle (ms) | 149.85 [149.51, 150.24] | 167.87 [165.09, 169.92] | 167.79 [166.26, 170.27] |
| Cycle, 95th percentile (ms) | 156.70 | 177.43 | 177.83 |
| Scene | Direct Python | ROS 1 | Persistent ROS 1 | Agreement |
|---|---|---|---|---|
| RealHand L6 / Cube | 149.1 (0.79) | 180.3 (7.60) | 176.5 (1.17) | |
| RealHand L6 / Sphere | 73.4 (0.58) | 119.4 (1.73) | 115.4 (0.86) | |
| RealHand L6 / Cylinder | 43.7 (0.63) | 100.8 (1.84) | 94.8 (1.89) | |
| Barrett / Cube | 15.6 (0.69) | 38.0 (1.23) | 36.2 (1.52) | |
| Barrett / Sphere | 8.24 (0.08) | 34.1 (0.15) | 32.6 (1.86) | |
| Barrett / Cylinder | 24.6 (1.75) | 43.5 (1.06) | 42.7 (2.78) |
Robotic Grasping
Robotic grasping studies how robots perceive, plan, and execute stable, task-appropriate contacts with objects across varied shapes and conditions.
See all 346 papers