From 55b439c5b6c21b8efffab8ce796ab4cee88dc6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Wed, 24 Jul 2024 16:01:46 +0200 Subject: [PATCH] Add ANYmal D description --- CHANGELOG.md | 1 + README.md | 1 + robot_descriptions/_descriptions.py | 1 + robot_descriptions/_repositories.py | 5 +++++ robot_descriptions/anymal_d_description.py | 21 +++++++++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 robot_descriptions/anymal_d_description.py diff --git a/CHANGELOG.md b/CHANGELOG.md index c9cbfa6..94ae949 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: ANYmal D - Description: LEAP Hand v1 - Description: Shadow DEX-EE (MJCF) (thanks to @kevinzakka) - Description: Stretch 3 (MJCF) (thanks to @kevinzakka) diff --git a/README.md b/README.md index 439b265..697625d 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,7 @@ The DOF column denotes the number of actuated degrees of freedom. | `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 | +| `anymal_d_description` | ANYmal D | ANYbotics | 12 | URDF | | `b1_description` | B1 | UNITREE Robotics | 12 | URDF | | `spot_mj_description` | Spot | Boston Dynamics | 12 | MJCF | | `go1_description` | Go1 | UNITREE Robotics | 12 | URDF | diff --git a/robot_descriptions/_descriptions.py b/robot_descriptions/_descriptions.py index 48971fd..8fb651a 100644 --- a/robot_descriptions/_descriptions.py +++ b/robot_descriptions/_descriptions.py @@ -59,6 +59,7 @@ def has_urdf(self) -> bool: "anymal_b_mj_description": Description(Format.MJCF), "anymal_c_description": Description(Format.URDF), "anymal_c_mj_description": Description(Format.MJCF), + "anymal_d_description": Description(Format.URDF), "atlas_drc_description": Description(Format.URDF), "atlas_v4_description": Description(Format.URDF), "b1_description": Description(Format.URDF), diff --git a/robot_descriptions/_repositories.py b/robot_descriptions/_repositories.py index dc3c538..56e5e67 100644 --- a/robot_descriptions/_repositories.py +++ b/robot_descriptions/_repositories.py @@ -36,6 +36,11 @@ class Repository: commit="f160b8f7fed840c47a6febe8e2bc78b32bf43a68", cache_path="anymal_c_simple_description", ), + "anymal_d_simple_description": Repository( + url="https://github.com/ANYbotics/anymal_d_simple_description.git", + commit="6adc14720aab583613975e5a9d6d4fa3cfcdd081", + cache_path="anymal_d_simple_description", + ), "baxter_common": Repository( url="https://github.com/RethinkRobotics/baxter_common.git", commit="v1.2.0", diff --git a/robot_descriptions/anymal_d_description.py b/robot_descriptions/anymal_d_description.py new file mode 100644 index 0000000..d0d1163 --- /dev/null +++ b/robot_descriptions/anymal_d_description.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Inria + +"""ANYmal D 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( + "anymal_d_simple_description", + commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None), +) + +PACKAGE_PATH: str = _path.join(REPOSITORY_PATH) + +URDF_PATH: str = _path.join(PACKAGE_PATH, "urdf", "anymal.urdf")