Skip to content

Commit 09af184

Browse files
Merge pull request #108 from kevinzakka/mujoco/leap-hand
Add LEAP hand MJCF description from Menagerie.
2 parents 9f36841 + dc5235d commit 09af184

File tree

5 files changed

+30
-1
lines changed

5 files changed

+30
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Description: Unitree B2
10+
- Description: Left and right LEAP hand (MJCF) (thanks to @kevinzakka)
1011

1112
### Changed
1213

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ The DOF column denotes the number of actuated degrees of freedom.
202202
| `allegro_hand_mj_description` | Allegro Hand | Wonik Robotics | 16 | MJCF |
203203
| `barrett_hand_description` | BarrettHand | Barrett Technology | 8 | URDF |
204204
| `leap_hand_v1` | LEAP Hand v1 | Carnegie Mellon University | 16 | URDF |
205+
| `leap_hand_mj_description` | LEAP Hand | Carnegie Mellon University | 16 | MJCF |
205206
| `robotiq_2f85_description` | Robotiq 2F-85 | Robotiq | 1 | URDF |
206207
| `robotiq_2f85_mj_description` | Robotiq 2F-85 | Robotiq | 1 | MJCF |
207208
| `shadow_dexee_mj_description` | Shadow DEX-EE | The Shadow Robot Company | 12 | MJCF |

Diff for: robot_descriptions/_descriptions.py

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def has_urdf(self) -> bool:
9898
"jvrc_mj_description": Description(Format.MJCF),
9999
"laikago_description": Description(Format.URDF),
100100
"leap_hand_v1": Description(Format.URDF),
101+
"leap_hand_mj_description": Description(Format.MJCF),
101102
"mini_cheetah_description": Description(Format.URDF),
102103
"minitaur_description": Description(Format.URDF),
103104
"nextage_description": Description(Format.URDF),

Diff for: robot_descriptions/_repositories.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class Repository:
157157
),
158158
"mujoco_menagerie": Repository(
159159
url="https://github.com/deepmind/mujoco_menagerie.git",
160-
commit="3d593a327ff8d5efd10f4926ccc477820e9252c1",
160+
commit="f59b989dea80a523b0e0b0fbe550c664939c6376",
161161
cache_path="mujoco_menagerie",
162162
),
163163
"nao_robot": Repository(

Diff for: robot_descriptions/leap_hand_mj_description.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
"""LEAP hand MJCF description."""
7+
8+
from os import getenv as _getenv
9+
from os import path as _path
10+
11+
from ._cache import clone_to_cache as _clone_to_cache
12+
13+
REPOSITORY_PATH: str = _clone_to_cache(
14+
"mujoco_menagerie",
15+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
16+
)
17+
18+
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "leap_hand")
19+
20+
MJCF_PATH: str = _path.join(PACKAGE_PATH, "right_hand.xml")
21+
22+
# Description-specific paths
23+
24+
MJCF_PATH_LEFT: str = _path.join(PACKAGE_PATH, "left_hand.xml")
25+
26+
MJCF_PATH_RIGHT: str = _path.join(PACKAGE_PATH, "right_hand.xml")

0 commit comments

Comments
 (0)