Repository navigation
Unitree H1: sync body masses and inertials with upstream URDF update - #340
Open
akushonkamen wants to merge 1 commit into
Open
akushonkamen wants to merge 1 commit into
akushonkamen wants to merge 1 commit into
Conversation
unitreerobotics/unitree_ros@34e7506 (2025-12-31, 'update h1 urdf (mass&inertial)') revised the masses, centers of mass and inertia tensors of the pelvis, both legs and both arms; unitree_h1/h1.xml still carried older values (51.44 kg total vs 59.34 kg in the URDF, most of the gap in the legs). This syncs the affected <inertial> blocks from that commit. Joint limits, kinematics and collision geometry are unchanged, and the hip_pitch range stays as-is. Also adds the CONTRIBUTORS.md entry (casefold order, per test/model_dir_test.py::ContributorsTest::test_sorted) and a model CHANGELOG.md entry. Verified on this exact tree with MuJoCo 3.16.0: every body's mass, COM and body-frame inertia tensor reconstructed from h1.xml matches the URDF reference (20/20 bodies; model total 59.338 kg), 'uv run --quiet --with-requirements test/requirements.txt pytest test/ -q' = 375 passed, 1 skipped (exit 0), and 'make check' is green. Fixes google-deepmind#333. Signed-off-by: akushonkamen <akushonkamen@163.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
unitree_h1/h1.xmlstill carried the pre-Dec-2025 body inertials. Upstreamunitreerobotics/unitree_ros@34e7506
(2025-12-31, "update h1 urdf (mass&inertial)") revised the masses, centers of mass and
inertia tensors of the pelvis, both legs and both arms — 59.34 kg total — while
h1.xmlsummed to 51.44 kg, the discrepancy reported in #333.
The fix resyncs the affected
<inertial>blocks from that URDF commit via a scriptedURDF→MJCF conversion (R_rpy @ I @ R_rpy^T, eigen-decomposition into the principal frame),
applied minimally:
pos+ mass (stale COM, inertia matched)torso_linkuntouched (already matched)Joint limits, kinematics and collision geometry are unchanged; the
hip_pitchrange isleft as-is per the open question in the issue.
unitree_h1/CHANGELOG.mddocuments thechange and the contributor entry is added to
CONTRIBUTORS.md(alphabetical by first name,per the sorted-order test).
Methodology check: before being applied, the converter was validated to reproduce the
then-current file's (parent revision, unitree_ros e909ca2) masses, COMs and diagonal
inertias digit-for-digit.
Verification, all run locally on this exact tree:
unitree_ros@34e7506 URDF → 19/20 bodies FAIL, totals mjcf=51.437 vs urdf=59.338
(reproduces the issue's 51.44/59.34).
of all 20 bodies match the URDF; total model mass 59.338 kg.
make check: all pre-commit hooks Passed (trailing-whitespace, end-of-file, yaml,merge-conflict, mixed-line, ruff, ruff-format, LICENSE, format_xml).
uv run --quiet --with-requirements test/requirements.txt pytest test/ -q→ 375 passed, 1 skipped.
Investigated, edited and tested with Claude Code (AI assistant).
Fixes: #333
Checklist
make allpasses locally (lint, format, license, XML, tests) —make checkallhooks Passed;
pytest test/375 passed, 1 skippedCONTRIBUTORS.md(alphabetical by first name)CHANGELOG.md(model-local:unitree_h1/CHANGELOG.md)— left unticked: signing requires the account holder's action; will be ticked once
confirmed at cla.developers.google.com