Skip to content

Add SMPL-X (GRAB) and MJCF humanoid importers#20

Open
xz6014 wants to merge 3 commits into
facebookresearch:mainfrom
xz6014:grab-mjcf-importers
Open

Add SMPL-X (GRAB) and MJCF humanoid importers#20
xz6014 wants to merge 3 commits into
facebookresearch:mainfrom
xz6014:grab-mjcf-importers

Conversation

@xz6014

@xz6014 xz6014 commented Jun 17, 2026

Copy link
Copy Markdown

Overview

This PR adds two model importers that bring SMPL-X grasping data and an articulated SMPL-X humanoid into AI4Animation, so captured hand–object interaction can be loaded, visualized, and retargeted within the framework.

The motivating use case: load a GRAB sequence (a subject grasping an object) and reproduce the same grasp on the InterMimic/InterPrior SMPL-X humanoid (omomo.xml), preserving the per-finger spatial–temporal contact.

Demo

Captured SMPL-X (GRAB) grasp (left) vs. the same motion retargeted onto the omomo SMPL-X humanoid (right), camera following the body:

SMPL-X vs omomo grasp comparison

Full-resolution clip: docs/media/grasp_compare_smplx_omomo.mp4

What's added

  • GRABImporter (ai4animation/Import/GRABImporter.py) — loads a GRAB sequence (SMPL-X body + grasped object + table) into the framework via SMPL-X forward kinematics: the subject body mesh is skinned to the 55 SMPL-X joints, and the object/table are appended as rigid meshes on their captured trajectories. Includes per-finger surface-to-surface contact detection (downsampled hand mesh vertices vs. the object mesh, via a KD-tree) with a soft contact-weight ramp.
  • MJCFImporter (ai4animation/Import/MJCFImporter.py) — a generic MuJoCo MJCF importer that parses the nested <body> tree and tessellates capsule/box/sphere geoms into meshes; used to load the articulated SMPL-X humanoid.

Both conform to the existing ModelImporter contract (JointNames/JointParents/JointMatrices/Meshes/Skin) and were verified to import and instantiate against a clean checkout of main.

Dependencies

Runtime: smplx, trimesh, scipy.

Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

GRABImporter: loads a GRAB sequence (SMPL-X body + grasped object + table)
into the ModelImporter contract via SMPL-X forward kinematics, with per-finger
surface-to-surface contact detection (downsampled hand verts vs object mesh).

MJCFImporter: generic MuJoCo MJCF importer (nested body tree; capsule/box/sphere
geoms tessellated), used to load the InterMimic SMPL-X humanoid (omomo.xml).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@meta-cla

meta-cla Bot commented Jun 17, 2026

Copy link
Copy Markdown

Hi @xz6014!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

xz6014 and others added 2 commits June 17, 2026 11:44
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 1, 2026
@meta-cla

meta-cla Bot commented Jul 1, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant