diff --git a/CHANGELOG.md b/CHANGELOG.md index bf9a9f8..21765b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ### Added +- Description: Ability Hand (MJCF) - Description: Ability Hand (URDF) - Description: Apptronik Apollo (MJCF) diff --git a/README.md b/README.md index a8869aa..905f57f 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,8 @@ The DOF column denotes the number of actuated degrees of freedom. | Name | Robot | Maker | Format | License | |----------------------------------|-----------------------|----------------------------|------------|---------| -| `ability_hand_description` | Ability Hand | PSYONIC, Inc. | URDF | MIT | +| `ability_hand_description` | Ability Hand | PSYONIC, Inc. | URDF | [MIT](https://github.com/psyonicinc/ability-hand-api/blob/89407424edfc22faceaedcd7c3ea2b7947cbbb2c/LICENSE) | +| `ability_hand_mj_description` | Ability Hand | PSYONIC, Inc. | MJCF | [MIT](https://github.com/psyonicinc/ability-hand-api/blob/89407424edfc22faceaedcd7c3ea2b7947cbbb2c/LICENSE) | | `allegro_hand_description` | Allegro Hand | Wonik Robotics | URDF | [BSD](https://github.com/RobotLocomotion/models/blob/5c027ea961473cb558da30e1a749272a8a9fa3eb/allegro_hand_description/LICENSE.TXT) | | `allegro_hand_mj_description` | Allegro Hand | Wonik Robotics | MJCF | [BSD-2-Clause](https://github.com/google-deepmind/mujoco_menagerie/blob/main/wonik_allegro/LICENSE) | | `barrett_hand_description` | BarrettHand | Barrett Technology | URDF | [BSD](https://github.com/jhu-lcsr-attic/bhand_model/blob/937f4186d6458bd682a7dae825fb6f4efe56ec69/manifest.xml) | diff --git a/robot_descriptions/_descriptions.py b/robot_descriptions/_descriptions.py index 7609143..53044a2 100644 --- a/robot_descriptions/_descriptions.py +++ b/robot_descriptions/_descriptions.py @@ -51,6 +51,7 @@ def has_urdf(self) -> bool: "a1_description": Description(Format.URDF), "a1_mj_description": Description(Format.MJCF), "ability_hand_description": Description(Format.URDF), + "ability_hand_mj_description": Description(Format.MJCF), "aliengo_description": Description(Format.URDF), "aliengo_mj_description": Description(Format.MJCF), "allegro_hand_description": Description(Format.URDF), diff --git a/robot_descriptions/ability_hand_mj_description.py b/robot_descriptions/ability_hand_mj_description.py new file mode 100644 index 0000000..e4281e7 --- /dev/null +++ b/robot_descriptions/ability_hand_mj_description.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: Apache-2.0 + +"""Ability Hand MJCF description.""" + +from os import getenv as _getenv +from os import path as _path + +from ._cache import clone_to_cache as _clone_to_cache + +REPOSITORY_PATH: str = _clone_to_cache( + "ability-hand-api", + commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None), +) + +PACKAGE_PATH: str = _path.join( + REPOSITORY_PATH, "python", "ah_simulators", "mujoco_xml" +) + +MJCF_PATH: str = _path.join(PACKAGE_PATH, "scene.xml") + +# Description-specific paths + +MJCF_PATH_LEFT_LARGE: str = _path.join( + PACKAGE_PATH, "hands", "abh_left_large.xml" +) + +MJCF_PATH_LEFT_SMALL: str = _path.join( + PACKAGE_PATH, "hands", "abh_left_small.xml" +) + +MJCF_PATH_RIGHT_LARGE: str = _path.join( + PACKAGE_PATH, "hands", "abh_right_large.xml" +) + +MJCF_PATH_RIGHT_SMALL: str = _path.join( + PACKAGE_PATH, "hands", "abh_right_small.xml" +) diff --git a/robot_descriptions/allegro_hand_mj_description.py b/robot_descriptions/allegro_hand_mj_description.py index aa7f0bc..0e230e5 100644 --- a/robot_descriptions/allegro_hand_mj_description.py +++ b/robot_descriptions/allegro_hand_mj_description.py @@ -19,6 +19,8 @@ MJCF_PATH: str = _path.join(PACKAGE_PATH, "right_hand.xml") +# Description-specific paths + MJCF_PATH_LEFT: str = _path.join(PACKAGE_PATH, "left_hand.xml") MJCF_PATH_RIGHT = MJCF_PATH