Skip to content

Commit

Permalink
Merge branch 'Danfoa-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Apr 22, 2024
2 parents 1ecaeee + ecec995 commit 1ef00c3
Show file tree
Hide file tree
Showing 30 changed files with 362 additions and 55 deletions.
33 changes: 31 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,39 @@ All notable changes to this project will be documented in this file.

### Added

- Description: UFACTORY xArm7 (MJCF) (thanks to @kevinzakka)

### Changed

- Split Aliengo into MJCF and URDF descriptions (thanks to @Danfoa)
- Update Aliengo URDF to a more active repository (thanks to @Danfoa)

## [1.9.0] - 2024-03-27

### Added

- Citation file and BibTeX section in the readme
- Description: Allegro Hand V3 (MJCF) (thanks to @kevinzakka)
- Description: ALOHA 2 (MJCF) (thanks to @kevinzakka)
- Description: Bitcraze Crazyflie 2.0 (MJCF) (thanks to @kevinzakka)
- Description: KUKA iiwa 14 (MJCF) (thanks to @kevinzakka)
- Description: Robotics OP3 (MJCF) (thanks to @kevinzakka)
- Description: Saywer (MJCF) (thanks to @kevinzakka)
- Description: Stretch 2 (MJCF) (thanks to @kevinzakka)
- Description: ViperX 300 6DOF (MJCF) (thanks to @kevinzakka)

### Changed

- Update Upkie description to v1.5.0
- Go1: Switch repository to MuJoCo Menagerie
- Go2: Switch repository to MuJoCo Menagerie
- H1: Switch repository to MuJoCo Menagerie
- JVRC-1: Update repository to maintained one at jrl-umi3218
- Upkie: Update repository to v1.5.0

### Fixed

- Bug when cloning a non-pinned description after a commit-pinned one
- Package name resolution when pinning a description to a specific commit

## [1.8.1] - 2024-01-29

Expand Down Expand Up @@ -312,7 +340,8 @@ This initial release includes 33 robot descriptions:
- Contributing instructions
- This changelog

[unreleased]: https://github.com/qpsolvers/qpsolvers/compare/v1.8.1...HEAD
[unreleased]: https://github.com/qpsolvers/qpsolvers/compare/v1.9.0...HEAD
[1.9.0]: https://github.com/qpsolvers/qpsolvers/compare/v1.8.1...v1.9.0
[1.8.1]: https://github.com/qpsolvers/qpsolvers/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/qpsolvers/qpsolvers/compare/v1.7.0...v1.8.0
[1.7.0]: https://github.com/qpsolvers/qpsolvers/compare/v1.6.0...v1.7.0
Expand Down
4 changes: 3 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cff-version: 1.2.0
message: "If you find this code helpful, please cite it as below."
title: "robot_descriptions.py: Robot descriptions in Python"
version: 1.8.1
version: 1.9.0
date-released: 2024-01-29
url: "https://github.com/robot-descriptions/robot_descriptions.py"
license: "Apache-2.0"
Expand All @@ -21,3 +21,5 @@ authors:
orcid: "https://orcid.org/0000-0002-7336-1443"
- family-names: "Bang"
given-names: "Seung Hyeon"
- family-names: "Zakka"
given-names: "Kevin"
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ Importing a description for the first time automatically downloads and caches fi

## Installation

### Install from pip
### PyPI

[![PyPI version](https://img.shields.io/pypi/v/robot_descriptions)](https://pypi.org/project/robot_descriptions/)

```console
pip install robot_descriptions
```

### Install from conda
### Conda

[![Conda Version](https://img.shields.io/conda/vn/conda-forge/robot_descriptions.svg)](https://anaconda.org/conda-forge/robot_descriptions)

```console
conda install -c conda-forge robot_descriptions
Expand Down Expand Up @@ -111,15 +115,15 @@ robot_descriptions show solo_description

Available robot descriptions ([gallery](https://github.com/robot-descriptions/awesome-robot-descriptions#gallery)) are listed in the following categories:

* [Arms](#arms)
* [Bipeds](#bipeds)
* [Dual arms](#dual-arms)
* [Drones](#drones)
* [Educational](#educational)
* [End effectors](#end-effectors)
* [Mobile manipulators](#mobile-manipulators)
* [Humanoids](#humanoids)
* [Quadrupeds](#quadrupeds)
- [Arms](#arms)
- [Bipeds](#bipeds)
- [Dual arms](#dual-arms)
- [Drones](#drones)
- [Educational](#educational)
- [End effectors](#end-effectors)
- [Humanoids](#humanoids)
- [Mobile manipulators](#mobile-manipulators)
- [Quadrupeds](#quadrupeds)

The DOF column denotes the number of actuated degrees of freedom.

Expand All @@ -133,14 +137,18 @@ The DOF column denotes the number of actuated degrees of freedom.
| `gen3_description` | Gen3 (Jaco) | Kinova | 6 | URDF |
| `gen3_mj_description` | Gen3 (Jaco) | Kinova | 7 | MJCF |
| `iiwa_description` | iiwa | KUKA | 7 | URDF |
| `iiwa_mj_description` | iiwa14 | KUKA | 7 | MJCF |
| `panda_description` | Panda | Franka Emika | 8 | URDF |
| `panda_mj_description` | Panda | Franka Emika | 8 | MJCF |
| `poppy_ergo_jr_description` | Poppy Ergo Jr | Poppy Project | 6 | URDF |
| `sawyer_mj_description` | Sawyer | Rethink Robotics | 7 | MJCF |
| `ur10_description` | UR10 | Universal Robots | 6 | URDF |
| `ur10e_mj_description` | UR10e | Universal Robots | 6 | MJCF |
| `ur3_description` | UR3 | Universal Robots | 6 | URDF |
| `ur5_description` | UR5 | Universal Robots | 6 | URDF |
| `ur5e_mj_description` | UR5e | Universal Robots | 6 | MJCF |
| `viper_mj_description` | Viper | Trossen Robotics | 7 | MJCF |
| `xarm7_mj_description` | xArm7 | UFACTORY | 7 | MJCF |
| `z1_description` | Z1 | UNITREE Robotics | 6 | URDF |

### Bipeds
Expand All @@ -158,6 +166,7 @@ The DOF column denotes the number of actuated degrees of freedom.

| Name | Robot | Maker | DOF | Format |
|-------------------------------|-----------------------|--------------------------|-----|------------|
| `aloha_mj_description` | Aloha 2 | Trossen Robotics | 14 | MJCF |
| `baxter_description` | Baxter | Rethink Robotics | 15 | URDF |
| `nextage_description` | NEXTAGE | Kawada Robotics | 15 | URDF |
| `poppy_torso_description` | Poppy Torso | Poppy Project | 13 | URDF |
Expand All @@ -168,6 +177,7 @@ The DOF column denotes the number of actuated degrees of freedom.
| Name | Robot | Maker | DOF | Format |
|-------------------------------|-----------------------|--------------------------|-----|------------|
| `cf2_description` | Crazyflie 2.0 | Bitcraze | 0 | URDF |
| `cf2_mj_description` | Crazyflie 2.0 | Bitcraze | 6 | MJCF |
| `skydio_x2_description` | Skydio X2 | Skydio | 6 | URDF |
| `skydio_x2_mj_description` | Skydio X2 | Skydio | 6 | MJCF |

Expand All @@ -185,6 +195,7 @@ The DOF column denotes the number of actuated degrees of freedom.
| Name | Robot | Maker | DOF | Format |
|-------------------------------|-----------------------|--------------------------|-----|------------|
| `allegro_hand_description` | Allegro Hand | Wonik Robotics | 16 | URDF |
| `allegro_hand_mj_description` | Allegro Hand | Wonik Robotics | 16 | MJCF |
| `barrett_hand_description` | BarrettHand | Barrett Technology | 8 | URDF |
| `robotiq_2f85_description` | Robotiq 2F-85 | Robotiq | 1 | URDF |
| `robotiq_2f85_mj_description` | Robotiq 2F-85 | Robotiq | 1 | MJCF |
Expand All @@ -204,6 +215,7 @@ The DOF column denotes the number of actuated degrees of freedom.
| `jaxon_description` | JAXON | JSK | 38 | URDF |
| `jvrc_description` | JVRC-1 | AIST | 34 | URDF |
| `jvrc_mj_description` | JVRC-1 | AIST | 34 | MJCF |
| `op3_mj_description` | OP3 | ROBOTIS | 20 | MJCF |
| `r2_description` | Robonaut 2 | NASA JSC Robotics | 56 | URDF |
| `romeo_description` | Romeo | Aldebaran Robotics | 37 | URDF |
| `sigmaban_description` | SigmaBan | Rhoban | 20 | URDF |
Expand All @@ -221,20 +233,22 @@ The DOF column denotes the number of actuated degrees of freedom.
| `pr2_description` | PR2 | Willow Garage | 32 | URDF |
| `reachy_description` | Reachy | Pollen Robotics | 21 | URDF |
| `stretch_description` | Stretch RE1 | Hello Robot | 14 | URDF |
| `sretch_mj_description` | Stretch 2 | Hello Robot | 14 | MJCF |
| `tiago_description` | TIAGo | PAL Robotics | 48 | URDF |

### Quadrupeds

| Name | Robot | Maker | DOF | Format |
|-------------------------------|-----------------------|--------------------------|-----|------------|
| `a1_mj_description` | A1 | UNITREE Robotics | 12 | MJCF |
| `a1_description` | A1 | UNITREE Robotics | 12 | URDF |
| `b1_description` | B1 | UNITREE Robotics | 12 | URDF |
| `aliengo_description` | Aliengo | UNITREE Robotics | 12 | MJCF, URDF |
| `anymal_b_mj_description` | ANYmal B | ANYbotics | 12 | MJCF |
| `a1_mj_description` | A1 | UNITREE Robotics | 12 | MJCF |
| `aliengo_description` | Aliengo | UNITREE Robotics | 12 | URDF |
| `aliengo_mj_description` | Aliengo | UNITREE Robotics | 12 | MJCF |
| `anymal_b_description` | ANYmal B | ANYbotics | 12 | URDF |
| `anymal_b_mj_description` | ANYmal B | ANYbotics | 12 | MJCF |
| `anymal_c_description` | ANYmal C | ANYbotics | 12 | URDF |
| `anymal_c_mj_description` | ANYmal C | ANYbotics | 12 | MJCF |
| `b1_description` | B1 | UNITREE Robotics | 12 | URDF |
| `go1_description` | Go1 | UNITREE Robotics | 12 | URDF |
| `go1_mj_description` | Go1 | UNITREE Robotics | 12 | MJCF |
| `go2_description` | Go2 | UNITREE Robotics | 12 | URDF |
Expand All @@ -259,12 +273,12 @@ If you use `robot_descriptions.py` in your scientific works, please cite it *e.g

```bibtex
@software{robot_descriptions_py2024,
author = {Caron, Stéphane and Romualdi, Giulio and Kozlov, Lev and Ordonez, Daniel and Tadashi Kussaba, Hugo and Bang, Seung Hyeon},
author = {Caron, Stéphane and Romualdi, Giulio and Kozlov, Lev and Ordonez, Daniel and Tadashi Kussaba, Hugo and Bang, Seung Hyeon and Zakka, Kevin},
license = {Apache-2.0},
month = feb,
month = mar,
title = {{robot_descriptions.py: Robot descriptions in Python}},
url = {https://github.com/robot-descriptions/robot_descriptions.py},
version = {1.8.1},
version = {1.9.0},
year = {2024}
}
```
Expand Down
2 changes: 1 addition & 1 deletion robot_descriptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

"""Import open source robot description as Python modules."""

__version__ = "1.8.1"
__version__ = "1.9.0"
16 changes: 15 additions & 1 deletion robot_descriptions/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,25 @@ def clone_to_cache(description_name: str, commit: Optional[str] = None) -> str:

cache_path = repository.cache_path
if commit is not None:
cache_path += f"-{commit}"
# Requirement: the last directory in the cache path is named after the
# cache path (more precisely the package name) so that package:// URIs
# work in frameworks that resolve them via directories
cache_path = f"{cache_path}-{commit}/{cache_path}"
target_dir = os.path.join(cache_dir, cache_path)
clone = clone_to_directory(
repository.url,
target_dir,
commit=repository.commit if commit is None else commit,
)
return str(clone.working_dir)


def clear_cache() -> None:
"""Clears the local cache where robot descriptions are stored."""
cache_dir = os.path.expanduser(
os.environ.get(
"ROBOT_DESCRIPTIONS_CACHE",
"~/.cache/robot_descriptions",
)
)
shutil.rmtree(cache_dir, ignore_errors=True)
12 changes: 11 additions & 1 deletion robot_descriptions/_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ def has_urdf(self) -> bool:
DESCRIPTIONS: Dict[str, Description] = {
"a1_description": Description(Format.URDF),
"a1_mj_description": Description(Format.MJCF),
"aliengo_description": Description(Format.MJCF),
"aliengo_description": Description(Format.URDF),
"aliengo_mj_description": Description(Format.MJCF),
"aloha_mj_description": Description(Format.MJCF),
"allegro_hand_description": Description(Format.URDF),
"allegro_hand_mj_description": Description(Format.MJCF),
"anymal_b_description": Description(Format.URDF),
"anymal_b_mj_description": Description(Format.MJCF),
"anymal_c_description": Description(Format.URDF),
Expand All @@ -65,6 +68,7 @@ def has_urdf(self) -> bool:
"cassie_description": Description(Format.URDF),
"cassie_mj_description": Description(Format.MJCF),
"cf2_description": Description(Format.URDF),
"cf2_mj_description": Description(Format.MJCF),
"double_pendulum_description": Description(Format.URDF),
"draco3_description": Description(Format.URDF),
"edo_description": Description(Format.URDF),
Expand All @@ -84,13 +88,15 @@ def has_urdf(self) -> bool:
"hyq_description": Description(Format.URDF),
"icub_description": Description(Format.URDF),
"iiwa_description": Description(Format.URDF),
"iiwa_mj_description": Description(Format.MJCF),
"jaxon_description": Description(Format.URDF),
"jvrc_description": Description(Format.URDF),
"jvrc_mj_description": Description(Format.MJCF),
"laikago_description": Description(Format.URDF),
"mini_cheetah_description": Description(Format.URDF),
"minitaur_description": Description(Format.URDF),
"nextage_description": Description(Format.URDF),
"op3_mj_description": Description(Format.MJCF),
"panda_description": Description(Format.URDF),
"panda_mj_description": Description(Format.MJCF),
"pepper_description": Description(Format.URDF),
Expand All @@ -103,13 +109,15 @@ def has_urdf(self) -> bool:
"robotiq_2f85_description": Description(Format.URDF),
"robotiq_2f85_mj_description": Description(Format.MJCF),
"romeo_description": Description(Format.URDF),
"sawyer_mj_description": Description(Format.MJCF),
"shadow_hand_mj_description": Description(Format.MJCF),
"simple_humanoid_description": Description(Format.URDF),
"skydio_x2_description": Description(Format.URDF),
"skydio_x2_mj_description": Description(Format.MJCF),
"solo_description": Description(Format.URDF),
"spryped_description": Description(Format.URDF),
"stretch_description": Description(Format.URDF),
"stretch_mj_description": Description(Format.MJCF),
"talos_description": Description(Format.URDF),
"tiago_description": Description(Format.URDF),
"trifinger_edu_description": Description(Format.URDF),
Expand All @@ -120,6 +128,8 @@ def has_urdf(self) -> bool:
"ur5_description": Description(Format.URDF),
"ur5e_mj_description": Description(Format.MJCF),
"valkyrie_description": Description(Format.URDF),
"viper_mj_description": Description(Format.MJCF),
"xarm7_mj_description": Description(Format.MJCF),
"yumi_description": Description(Format.URDF),
"z1_description": Description(Format.URDF),
"z1_mj_description": Description(Format.MJCF),
Expand Down
6 changes: 3 additions & 3 deletions robot_descriptions/_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class Repository:
cache_path="jaxon_description",
),
"jvrc_description": Repository(
url="https://github.com/robot-descriptions/jvrc_description.git",
commit="b788e1a7c874b3447fc027e175f216c6192e9e96",
url="https://github.com/jrl-umi3218/jvrc_description.git",
commit="9ff8efbc7043459a8f0892662bd030d8020fb682",
cache_path="jvrc_description",
),
"jvrc_mj_description": Repository(
Expand All @@ -144,7 +144,7 @@ class Repository:
),
"mujoco_menagerie": Repository(
url="https://github.com/deepmind/mujoco_menagerie.git",
commit="a099b54b539416bff0db4d35fc2271c35c10f37a",
commit="915d92c60858c3649e04af2ae93ac2c51fe18c24",
cache_path="mujoco_menagerie",
),
"nao_robot": Repository(
Expand Down
8 changes: 4 additions & 4 deletions robot_descriptions/aliengo_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
from ._cache import clone_to_cache as _clone_to_cache

REPOSITORY_PATH: str = _clone_to_cache(
"unitree_mujoco",
"unitree_ros",
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
)

PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "data", "aliengo")

MJCF_PATH: str = _path.join(PACKAGE_PATH, "xml", "aliengo.xml")
PACKAGE_PATH: str = _path.join(
REPOSITORY_PATH, "robots", "aliengo_description"
)

URDF_PATH: str = _path.join(PACKAGE_PATH, "urdf", "aliengo.urdf")
21 changes: 21 additions & 0 deletions robot_descriptions/aliengo_mj_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 Stéphane Caron

"""Aliengo 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(
"unitree_mujoco",
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
)

PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "data", "aliengo")

MJCF_PATH: str = _path.join(PACKAGE_PATH, "xml", "aliengo.xml")
24 changes: 24 additions & 0 deletions robot_descriptions/allegro_hand_mj_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: Apache-2.0

"""Allegro Hand V3 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(
"mujoco_menagerie",
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
)

PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "wonik_allegro")

MJCF_PATH: str = _path.join(PACKAGE_PATH, "right_hand.xml")

MJCF_PATH_LEFT: str = _path.join(PACKAGE_PATH, "left_hand.xml")

MJCF_PATH_RIGHT = MJCF_PATH
Loading

0 comments on commit 1ef00c3

Please sign in to comment.