From 56e1323150fd0040a20795f54ec730b88ee84349 Mon Sep 17 00:00:00 2001 From: Yutong Zhang Date: Thu, 17 Jul 2025 17:14:54 -0600 Subject: [PATCH 1/3] Fix H1 comment --- robot_descriptions/h1_description.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robot_descriptions/h1_description.py b/robot_descriptions/h1_description.py index 2cfa3303..e5a66425 100644 --- a/robot_descriptions/h1_description.py +++ b/robot_descriptions/h1_description.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2022 Stéphane Caron -"""Go2 description.""" +"""H1 description.""" from os import getenv as _getenv from os import path as _path From 9814d506c8e0f73855b62b062c5a2f4be33028bf Mon Sep 17 00:00:00 2001 From: Yutong Zhang Date: Thu, 17 Jul 2025 17:19:50 -0600 Subject: [PATCH 2/3] Add Unitree H1_2 description --- CHANGELOG.md | 2 ++ README.md | 2 ++ robot_descriptions/_descriptions.py | 2 ++ robot_descriptions/_repositories.py | 2 +- robot_descriptions/h1_2_description.py | 20 ++++++++++++++++++++ robot_descriptions/h1_2_mj_description.py | 20 ++++++++++++++++++++ 6 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 robot_descriptions/h1_2_description.py create mode 100644 robot_descriptions/h1_2_mj_description.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 3495f657..48db812a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ All notable changes to this project will be documented in this file. - Description: RBY1 Mobile Manipulatior (URDF) (thanks to @uynitsuj) - Description: YAM (MJCF) (thanks to @uynitsuj) - Description: YAM (URDF) (thanks to @uynitsuj) +- Description: Unitree H1_2 (URDF) (thanks to @TonyZYT2000) +- Description: Unitree H1_2 (MJCF) (thanks to @TonyZYT2000) ## [1.19.0] - 2025-07-03 diff --git a/README.md b/README.md index 412c7f59..40e146e5 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,8 @@ The DOF column denotes the number of actuated degrees of freedom. | `gr1_description` | GR-1 | Fourier | URDF | [GPL-3.0](https://github.com/FFTAI/Wiki-GRx-Models/blob/351245ac8fa4bf6f4b0c41556e1e6976a438bcef/LICENSE) | | `h1_description` | H1 | UNITREE Robotics | URDF | BSD-3-Clause | | `h1_mj_description` | H1 | UNITREE Robotics | MJCF | BSD-3-Clause | +| `h1_2_description` | H1_2 | UNITREE Robotics | URDF | BSD-3-Clause | +| `h1_2_mj_description` | H1_2 | UNITREE Robotics | MJCF | BSD-3-Clause | | `icub_description` | iCub | IIT | URDF | CC-BY-SA-4.0 ✖️ | | `jaxon_description` | JAXON | JSK | URDF | CC-BY-SA-4.0 ✖️ | | `jvrc_description` | JVRC-1 | AIST | URDF | BSD-2-Clause | diff --git a/robot_descriptions/_descriptions.py b/robot_descriptions/_descriptions.py index 1766e8d1..ae7e2d52 100644 --- a/robot_descriptions/_descriptions.py +++ b/robot_descriptions/_descriptions.py @@ -131,6 +131,8 @@ def has_urdf(self) -> bool: "gr1_description": Description(Format.URDF, tags={"humanoid"}), "h1_description": Description(Format.URDF, tags={"humanoid"}), "h1_mj_description": Description(Format.MJCF, tags={"humanoid"}), + "h1_2_description": Description(Format.URDF, tags={"humanoid"}), + "h1_2_mj_description": Description(Format.MJCF, tags={"humanoid"}), "hyq_description": Description(Format.URDF, tags={"quadruped"}), "icub_description": Description(Format.URDF, tags={"humanoid"}), "iiwa7_description": Description(Format.URDF, tags={"arm"}), diff --git a/robot_descriptions/_repositories.py b/robot_descriptions/_repositories.py index 7938ce11..87db4de8 100644 --- a/robot_descriptions/_repositories.py +++ b/robot_descriptions/_repositories.py @@ -325,7 +325,7 @@ class Repository: ), "unitree_ros": Repository( url="https://github.com/unitreerobotics/unitree_ros.git", - commit="8bca7f8907bf6feceac80809ae67e4b379ab9cfc", + commit="267182b8521c8d6a631bab1fe63836873237a525", cache_path="unitree_ros", ), "upkie_description": Repository( diff --git a/robot_descriptions/h1_2_description.py b/robot_descriptions/h1_2_description.py new file mode 100644 index 00000000..ce7b4608 --- /dev/null +++ b/robot_descriptions/h1_2_description.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: Apache-2.0 + +"""H1_2 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_ros", + commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None), +) + +PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "robots", "h1_2_description") + +URDF_PATH: str = _path.join(PACKAGE_PATH, "h1_2.urdf") diff --git a/robot_descriptions/h1_2_mj_description.py b/robot_descriptions/h1_2_mj_description.py new file mode 100644 index 00000000..b1d94596 --- /dev/null +++ b/robot_descriptions/h1_2_mj_description.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: Apache-2.0 + +"""Unitree H1_2 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( + "unitree_ros", + commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None), +) + +PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "robots", "h1_2_description") + +MJCF_PATH: str = _path.join(PACKAGE_PATH, "h1_2.xml") From 771462addd4f8f878afc96a355d8822ac47fe440 Mon Sep 17 00:00:00 2001 From: Yutong Zhang Date: Fri, 18 Jul 2025 15:10:44 -0600 Subject: [PATCH 3/3] Update Unitree G1 file name --- robot_descriptions/g1_description.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robot_descriptions/g1_description.py b/robot_descriptions/g1_description.py index 44f77d2d..12805768 100644 --- a/robot_descriptions/g1_description.py +++ b/robot_descriptions/g1_description.py @@ -15,4 +15,4 @@ PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "robots", "g1_description") -URDF_PATH: str = _path.join(PACKAGE_PATH, "g1.urdf") +URDF_PATH: str = _path.join(PACKAGE_PATH, "g1_29dof.urdf")