Floating dexterous hands for MuJoCo (Revo2 + Shadow Hand)
Two ready-to-run MuJoCo scenes of a free-floating five-finger hand above a table with graspable objects, built for glove-driven teleoperation research.
revo2/โ the BrainCo Revo2 hand, i.e. the five-finger hand used on the Unitree G1. 11 joints (thumb ร3, then proximal+distal for index/middle/ring/pinky) and 11 position actuators.shadow/โ the Shadow Hand, for comparison. 20 actuators.
Each folder is self-contained: one MJCF file plus its meshes. Nothing else needed.
Quick start
pip install mujoco # built and tested against MuJoCo 4.0.1
cd revo2
python -m mujoco.viewer --mjcf=revo2_scene.xml
In Python:
import mujoco
model = mujoco.MjModel.from_xml_path("revo2_scene.xml") # run from revo2/
data = mujoco.MjData(model)
# Close every finger: drive each actuator to the top of its ctrlrange.
for i in range(model.nu):
data.ctrl[i] = model.actuator_ctrlrange[i, 1]
for _ in range(1000):
mujoco.mj_step(model, data)
Run from inside the folder, or pass an absolute path โ meshdir="meshes" is
relative to the XML, and the meshes/ directory must stay next to it.
Viewing it in 3D
Hugging Face cannot preview MJCF, so the images above are pre-rendered. For an interactive view, MuJoCo 4.0 ships a browser-based viewer:
pip install mujoco # also installs mujoco-studio
mujoco-studio revo2/revo2_scene.xml # desktop viewer
mujoco-studio revo2/revo2_scene.xml --gfx web --port 8080 # browser viewer
or the classic viewer:
python -m mujoco.viewer --mjcf=revo2/revo2_scene.xml
The renders above were produced headlessly (MUJOCO_GL=egl) with
mujoco.Renderer, so they can be regenerated on a server with no display.
What's in the scene
revo2 |
shadow |
|
|---|---|---|
nq |
39 | 52 |
nu (actuators) |
11 | 20 |
| bodies | 23 | โ |
| meshes | 17 | 13 |
Both scenes contain a ground plane, a table at z = 0, and three free objects:
a 3 cm ball, a 2.2 cm cube, and a 2.5 ร 5 cm cylinder.
The hand's root body carries a free joint and is welded to a mocap body named
hand_target. Write to data.mocap_pos[0] / data.mocap_quat[0] to move the
wrist โ the hand follows through the weld. This is how an external wrist source
(tracker, leader arm, keyboard) drives the arm.
Driving the fingers
Actuators are named act_<joint>, e.g. act_right_thumb_metacarpal_joint. Each
one's ctrlrange equals its joint limits, so a single "curl" value per finger
maps cleanly onto the hand:
JOINTS = {
"thumb": ["right_thumb_metacarpal_joint", "right_thumb_proximal_joint",
"right_thumb_distal_joint"],
"index": ["right_index_proximal_joint", "right_index_distal_joint"],
"middle": ["right_middle_proximal_joint", "right_middle_distal_joint"],
"ring": ["right_ring_proximal_joint", "right_ring_distal_joint"],
"little": ["right_pinky_proximal_joint", "right_pinky_distal_joint"],
}
def set_curl(model, data, finger, curl): # curl: 0.0 straight .. 1.0 curled
for jn in JOINTS[finger]:
i = model.actuator(f"act_{jn}").id
lo, hi = model.actuator_ctrlrange[i]
data.ctrl[i] = lo + (hi - lo) * curl
That is exactly the interface a data glove needs: five numbers in, 11 joints out.
Notes for anyone rebuilding this from the upstream URDF
Three things cost real time, and are worth knowing:
fusestatic = Falseis required when loading the URDF, or MuJoCo merges the root link into the world body and there is nothing to attach a free joint to. The free joint must go on the URDF root, not the first child.- The collision meshes are the full-resolution visual STLs. Left alone, the
fingers jam on each other and the palm and the thumb will not move at all.
Masking hand geoms as
contype=1, conaffinity=0leaves them colliding with objects but not with each other. - Add
armatureto the finger joints. At ~10 g per link (inertias ~1e-5 kgยทmยฒ) a position servo either rings (fractions swinging 0.56โ1.30) or crawls and never arrives. Witharmature=5e-3, kp=20 / kv=1.0 tracks to under 0.1% of range with no ripple โ and most sane gain pairs work once armature is set.
Known limitation
The Revo2 scene tracks commanded positions accurately but does not yet reliably grasp the ball autonomously. At ~0.7 curl the thumb and middle fingertips close to roughly 4.5 cm apart while the ball is 6 cm across, so it gets displaced instead of enveloped. Approach direction and thumb opposition need tuning. The Shadow Hand scene does grasp and lift the ball (+0.124 m).
Measured for reference: the Revo2 grasp centre (midpoint of thumb and middle
fingertips) sits about (-0.03, -0.03, -0.084) from the palm origin. Derive the
hand's start pose from that rather than guessing.
License and attribution
Apache-2.0. These are modified derivative works โ see NOTICE for
the full list of changes and upstream credits:
- Revo2 meshes and kinematics from unitreerobotics/xr_teleoperate, ยฉ 2025 Unitree Robotics.
- Shadow Hand from google-deepmind/mujoco_menagerie, original model by the Shadow Robot Company.
No part of this repository derives from any non-public asset.


