Skip to content

Commit a6b0e84

Browse files
Merge pull request google-deepmind#124 from alberthli:new-leap-hand
PiperOrigin-RevId: 703538497 Change-Id: I84f1db2ca4bb503f514e5c3cfddc63c531b3d699
2 parents 4ae690d + f9c2071 commit a6b0e84

29 files changed

+580604
-342
lines changed

leap_hand/README.md

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,67 @@
55
66
## Overview
77

8-
This package contains a simplified robot description (MJCF) of the (left and right) [LEAP Hand](https://leaphand.com/) developed by Carnegie Mellon University. It is derived from the [publicly available URDF description](https://github.com/leap-hand/LEAP_Hand_Sim/blob/master/assets/leap_hand/robot.urdf).
8+
This package contains a simplified robot description (MJCF) of the (left and right) [LEAP Hand](https://leaphand.com/) developed by Carnegie Mellon University. It is derived from the [publicly available URDF description](https://github.com/dexsuite/dex-urdf/tree/main/robots/hands/leap_hand).
99

1010
<p float="left">
11-
<img src="leap_hand_left.png" width="400">
12-
<img src="leap_hand_right.png" width="400">
11+
<img src="right_hand.png" width="400">
1312
</p>
1413

1514
## URDF → MJCF derivation steps
1615

17-
1. Added `<mujoco> <compiler discardvisual="false" strippath="false" fusestatic="false" balanceinertia="true"/> </mujoco>` to the URDF's
18-
`<robot>` clause in order to preserve visual geometries.
19-
2. Removed `package://` shortcuts in the URDF.
20-
3. Loaded the URDF into MuJoCo and saved a corresponding MJCF.
21-
4. Manually edited the MJCF to extract common properties into the `<default>` section.
22-
5. Added `exclude` clause to prevent collisions between the palm and the base of each finger as well as the mcp and dip joint of each finger.
23-
6. Added position controlled actuators.
24-
7. Added `impratio=10` and `cone=elliptic` for better noslip.
25-
8. Added `scene.xml` which includes the robot, with a textured groundplane, skybox, and haze.
26-
27-
Extra steps taken for the left hand:
28-
29-
- Renamed `palm_lower_left` to `palm_lower`.
30-
- Replaced `thumb_left_temp_base` mesh with `pip` to match the right hand.
31-
- Reordered the joints of the thumb to match that of the right hand.
16+
### Right Hand
17+
1. Start with the right-handed LEAP hand URDF from [dexsuite (hash: 2ee2f70cfd549857f56ffe13c61fa939f4cb50ba)](https://github.com/dexsuite/dex-urdf/tree/main/robots/hands/leap_hand)
18+
2. Run it through drake's fix_inertia tool (v. 1.30.0)
19+
3. Add the following mujoco block to the urdf under `<robot>`:
20+
```
21+
<mujoco>
22+
<compiler balanceinertia="true" discardvisual="false" fusestatic="false"/>
23+
</mujoco>
24+
```
25+
4. Open the file in the mujoco viewer using
26+
```
27+
python -m mujoco.viewer --mjcf=<name_of_inertia_fixed_urdf>.urdf
28+
```
29+
5. Save the xml out of the viewer by clicking the "Save xml" button. From now on, modifications are referring to the saved xml.
30+
6. Delete the auxiliary body "base" created by not fusing static bodies.
31+
7. Rename bodies and joints according to the following:
32+
- palm_lower -> palm
33+
- mcp_joint -> base
34+
- pip -> proximal
35+
- dip -> medial
36+
- fingertip -> distal
37+
- white_tip -> tip
38+
8. Give names to all geoms according to visual or collision status.
39+
9. Create default classes for joints and assign all joints to their appropriate class.
40+
10. Delete the actuatorfrcrange field for all joints.
41+
11. Add actuators for all the joints.
42+
12. Add collision filters.
43+
13. Create the visual default group + add the material black.
44+
14. Adjust actuator defaults and solref to increase realism of joints.
45+
15. Use the implicitfast integrator, elliptic friction cone, and high impratio.
46+
16. Create a geom class default for fingertips with high friction.
47+
17. Delete unnecessary "tip_head" bodies.
48+
18. Simplify the fingertip meshes using open3d:
49+
```
50+
import open3d as o3d
51+
52+
mesh = o3d.io.read_triangle_mesh("tip.obj")
53+
mesh_smp = mesh.simplify_quadric_decimation(target_number_of_triangles=100)
54+
o3d.io.write_triangle_mesh("tip_smp.obj", mesh_smp)
55+
56+
mesh = o3d.io.read_triangle_mesh("thumb_tip.obj")
57+
mesh_smp = mesh.simplify_quadric_decimation(target_number_of_triangles=100)
58+
o3d.io.write_triangle_mesh("thumb_tip_smp.obj", mesh_smp)
59+
```
60+
Replace the old obj files with the simplified ones.
61+
19. Add sensors for each of the fingers.
62+
20. Change the "pos" field of "thumb_mp_collision" to "-0.0075 -0.0002 -0.011" in
63+
order to fix incorrect orientation of thumb collision geometry.
64+
65+
### Left Hand
66+
The steps for creating the left hand are mostly the same, except for the following:
67+
- we use the `dexsuite` hash `6eeda17435d46dde5915a16fd37b248bd8bb468e`, because there are edits for making the left handed LEAP URDF more consistent with the right
68+
- there was no correction of the "thumb_mp_collision" field, but the associated visual mesh is different (thumb_mp_left.obj)
3269
3370
## License
3471

0 commit comments

Comments
 (0)