MCPcopy Index your code
hub / github.com/NVlabs/GraspDataGen

github.com/NVlabs/GraspDataGen @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
334 symbols 1,246 edges 29 files 165 documented · 49%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GraspDataGen

GraspDataGen is a standalone data generation tool but it can also be used to generate data for training new Grasp Gen models. It is designed to create collision-free, geometrically plausible grasps for triangle mesh objects and USD grippers, then validate them through physics simulation.

Overview

The system consists of three main components:

  1. Gripper Definition - Reads USD gripper files and extracts parameters needed for grasp generation
  2. Grasp Guess Generation - Creates geometrically plausible grasps for objects
  3. Grasp Simulation - Validates grasps through physics simulation using PhysX

Each component can be used independently or as part of a complete workflow.

Installation

For detailed installation instructions, see the Installation Guide. The guide covers:

  • Docker installation (recommended) - Includes all dependencies and IsaacLab
  • Integration with existing IsaacLab - Use with your current IsaacLab setup

Using Datagen

The easiest way to get started using the full GraspDataGen pipeline is by using predefined gripper configurations (see: scripts/graspgen/gripper_configurations.py) and the datagen.py script:

python scripts/graspgen/datagen.py \
    --gripper_config onrobot_rg6 \
    --object_scales_json objects/datagen_example.json \
    --object_root objects \
    --num_grasps 1024 \
    --max_num_envs 256

The datagen.py script is an example of using the 3 components together to generate and verify grasps for multiple objects defined in a JSON file.

Note: The datagen.py script handles objects differently: it loads multiple objects from a JSON file instead of a single object file. In contrast, individual components such as grasp_guess.py and grasp_sim.py use the --object_file argument for single objects.

Available Gripper Configurations

The system includes predefined configurations for common grippers:

  • robotiq_2f_85 - Robotiq 2F-85 parallel gripper
  • onrobot_rg6 - OnRobot RG6 gripper
  • franka_panda - Franka Panda gripper

Use --gripper_config <name> to configure all gripper parameters based on the user definitions in scripts/graspgen/gripper_configurations.py.

You can override any configuration parameter by providing it explicitly on the command line:

# Use onrobot_rg6 configuration but with custom parameters
python scripts/graspgen/datagen.py \
    --gripper_config onrobot_rg6 \
    --gripper_file bots/custom_gripper.usd \
    --bite 0.02 \
    --object_scales_json objects/datagen_example.json \
    --object_root objects

This will use the onrobot_rg6 configuration as a base but override the gripper file and bite depth with your custom values.

Note: Read more about the parameter override system that applies to all components of GraspDataGen.

Alternatively, you can add any new gripper configuration needed by adding to GRIPPER_CONFIGS in scripts/graspgen/gripper_configurations.py:

    'Robotiq_2F_85_msJul21': {
        'gripper_file': 'bots/Robotiq_2F_85_msJul21.usd',
        'finger_colliders': ['right_inner_finger', 'left_inner_finger'],
        'base_frame': 'base_link',
        'bite': 0.0185,  # half of 37mm
        'convergence_iterations': 172,
    },

This custom config was used when experimenting with a gripper that had a stiff physics setup and needed more --convergence_iterations to get a proper gripper definition.

Datagen Documentation

Using each component individually

This section describes the three main components of the GraspDataGen code base in the simplest standalone mode, and supplies documentation for a more detailed explanation and example.

Gripper definition

The gripper definition module is used to read the USD of a gripper and prepare it for grasp generation and validation. The minimum you need to create a gripper definition is a USD file, and the names of the finger and base prims, and you can create the definition with the create_gripper_lab.py script.

python scripts/graspgen/create_gripper_lab.py \
  --gripper_file bots/onrobot_rg6.usd \
  --finger_colliders right_inner_finger left_inner_finger \
  --base_frame base_frame

Documentation

Generate grasp guesses

You can generate geometrically plausible, collision-free grasps with the grasp_guess.py script.

python scripts/graspgen/grasp_guess.py \
    --gripper_config onrobot_rg6 \
    --object_file objects/banana.obj

Documentation

Validate grasps through simulation

If the grasps you want to validate have been generated by the grasp_guess module, then the only parameter you need to set when running grasp_sim is --grasp_file. The object and gripper settings will be gathered from the grasp file.

python scripts/graspgen/grasp_sim.py \
    --grasp_file grasp_guess_data/onrobot_rg6/banana.yaml

Documentation

Documentation

📚 Comprehensive documentation is available in the docs/ directory:

Citation

If you found this work to be useful, please considering citing:

@article{murali2025graspgen,
  title={GraspGen: A Diffusion-based Framework for 6-DOF Grasping with On-Generator Training},
  author={Murali, Adithyavairavan and Sundaralingam, Balakumar and Chao, Yu-Wei and Yamada, Jun and Yuan, Wentao and Carlson, Mark and Ramos, Fabio and Birchfield, Stan and Fox, Dieter and Eppner, Clemens},
  journal={arXiv preprint arXiv:2507.13097},
  url={https://arxiv.org/abs/2507.13097},
  year={2025},
}

Core symbols most depended-on inside this repo

print_blue
called by 75
scripts/graspgen/graspgen_utils.py
add_arg_to_group
called by 69
scripts/graspgen/graspgen_utils.py
print_yellow
called by 61
scripts/graspgen/graspgen_utils.py
print_red
called by 21
scripts/graspgen/graspgen_utils.py
load
called by 20
scripts/graspgen/gripper.py
print_green
called by 19
scripts/graspgen/graspgen_utils.py
print_purple
called by 13
scripts/graspgen/graspgen_utils.py
format_value
called by 11
scripts/graspgen/tools/compare_grippers.py

Shape

Function 200
Method 112
Class 22

Languages

Python100%

Modules by API surface

scripts/graspgen/warp_kernels.py47 symbols
scripts/graspgen/grasp_guess.py42 symbols
scripts/graspgen/grasp_sim.py29 symbols
scripts/graspgen/graspgen_utils.py27 symbols
scripts/graspgen/tools/visualize_grasp_data.py25 symbols
scripts/graspgen/graspgen.py18 symbols
scripts/graspgen/gripper.py16 symbols
scripts/graspgen/grasp_display.py14 symbols
scripts/graspgen/tools/analyze_grasp_data.py12 symbols
scripts/graspgen/tools/visualize_debug.py11 symbols
scripts/graspgen/create_gripper_lab.py11 symbols
scripts/graspgen/warp_functions.py10 symbols

For agents

$ claude mcp add GraspDataGen \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact