Skip to content

fix(sim): load pinned Unitree meshes without Playground - #5412

Open
aa-MONTS wants to merge 3 commits into
mainfrom
aa-monts/fix/unitree-playground-compatibility
Open

aa-MONTS wants to merge 3 commits into
mainfrom
aa-monts/fix/unitree-playground-compatibility

Conversation

@aa-MONTS

@aa-MONTS aa-MONTS commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Load Unitree’s pinned simulation models from dimOS’s own cache instead of relying on a download helper that newer Playground releases removed.

To be reviewed by @paul-nechifor.

Why do we need this?

A fresh install of the sim extra could select Playground 1.x and fail when starting a simulated Unitree robot. DimOS used Playground only to download MuJoCo Menagerie meshes through a private helper that disappeared in 1.x.

What is this feature?

The sim extra no longer depends on Playground. Unitree startup and model loading now use the same DimOS Git asset cache and the same Menagerie revision as before. The MuJoCo engine also reads meshes through that model loader. The library install check imports the installed DimOS model loader. To inspect the remaining references, run git grep -n mujoco_playground -- dimos. The only production hit looks up the optional package location for existing users. The other hit is a CLI startup test.

If Playground is installed and its bundled external_deps/mujoco_menagerie checkout has a detached HEAD at 1b86ece576591213e2b666ebf59508454200ca97, DimOS uses it in place without downloading it again. On a fresh install, or when the old checkout points elsewhere, DimOS resolves that revision in its own cache. A cached checkout already at the pin can be reused offline.

How to manually run this

From the checkout, in a fresh Python 3.12 environment, install the library extras and check that the model loader imports with Playground absent.

uv venv --python 3.12
source .venv/bin/activate
uv pip install --torch-backend cpu -e '.[base,unitree,sim,drone]'
python -c 'from importlib.util import find_spec; from dimos.simulation.mujoco.model import get_assets; assert find_spec("mujoco_playground") is None'

To inspect the chosen checkout, run the following command. The first run needs network access if neither cache contains the pinned revision. Run it again offline to check reuse.

python -c 'from dimos.simulation.mujoco.menagerie import menagerie_path; print(menagerie_path())'

On macOS arm64, the fresh install imported the loader with Playground absent. Using a local Git fixture, a second process compiled a MuJoCo mesh from the shared cache after the source went offline. Verification of the final change did not cover a cold download from upstream, reuse of a real installed Playground checkout, or a full Unitree simulation and viewer launch. The earlier Linux x86-64 Go2 launch used the first commit's Playground cap.

Which issue(s) does this PR close?

Fixes DIM-733

Checklist

  • I have read and approved the CLA.

@aa-MONTS aa-MONTS added the backport:skip Skip creating a backport to any release branches label Nov 21, 2026

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go2 replay realtime (arm64)

Details
Benchmark suite Current: bb4a83b Previous: 7aa6212 Ratio
peak memory 1760.652 MB 1746.68 MB 1.01
peak threads 370 threads 372 threads 0.99
network (transport) 2736.363 MB 2733.75 MB 1.00
disk write 1.953 MB 1.664 MB 1.17
instructions 139.009 G 137.505 G 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.00000% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/simulation/mujoco/menagerie.py 88.88% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #5412      +/-   ##
==========================================
- Coverage   84.91%   84.89%   -0.03%     
==========================================
  Files        1962     1963       +1     
  Lines      192795   192950     +155     
  Branches    15711    15740      +29     
==========================================
+ Hits       163715   163796      +81     
- Misses      25223    25291      +68     
- Partials     3857     3863       +6     
Components Coverage Δ
Tests 96.75% <100.00%> (-0.03%) ⬇️
Flag Coverage Δ
OS-macos-latest 79.34% <98.00%> (+0.01%) ⬆️
OS-ubuntu-26.04-arm 78.94% <98.00%> (+0.02%) ⬆️
OS-ubuntu-latest 79.39% <98.00%> (+0.02%) ⬆️
Py-3.10 79.39% <98.00%> (+0.01%) ⬆️
Py-3.11 79.36% <98.00%> (+0.01%) ⬆️
Py-3.12 79.38% <98.00%> (+0.02%) ⬆️
SelfHosted-Linux 40.54% <26.00%> (-0.02%) ⬇️
SelfHosted-macOS 40.28% <26.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/robot/assets/git_cache.py 87.25% <100.00%> (+0.25%) ⬆️
dimos/robot/assets/test_git_cache.py 100.00% <100.00%> (ø)
dimos/robot/unitree/mujoco_connection.py 68.68% <100.00%> (ø)
dimos/robot/unitree/test_mujoco_connection.py 97.31% <100.00%> (ø)
dimos/simulation/mujoco/test_menagerie.py 100.00% <100.00%> (+4.44%) ⬆️
dimos/simulation/mujoco/menagerie.py 92.85% <88.88%> (+30.35%) ⬆️

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aa-MONTS aa-MONTS changed the title fix(sim): require the Playground API used to load Unitree assets fix(sim): load pinned Unitree meshes without Playground Nov 21, 2026
@aa-MONTS
aa-MONTS marked this pull request as ready for review November 21, 2026 05:23
@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Removes Playground from the sim extra and resolves pinned Menagerie assets through GitAssetCache, while preserving reuse of matching Playground checkouts.

  • Unitree models load Menagerie meshes without Playground.

Reviews (2) · Last reviewed commit: "test(sim): cover offline reuse of pinned..." · Reviewed by Greptile

@greptile-apps

greptile-apps Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip Skip creating a backport to any release branches ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant