-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Working change for benchmarking new Mujoco Menagerie robot assets on Isaac Lab environments #5908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
matthewtrepte
wants to merge
7
commits into
isaac-sim:develop
Choose a base branch
from
matthewtrepte:mtrepte/mujoco_menagerie_v2
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ee3b811
Update training benchmark harness
matthewtrepte baa4d52
Stabilize LSTM actuator inference
matthewtrepte a6df4ab
Fail benchmark jobs on train errors
matthewtrepte 1ce56b8
Port MuJoCo Menagerie assets
matthewtrepte 83363fe
Fix Menagerie G1 event config
matthewtrepte 0911168
Stabilize Menagerie locomotion smoke
matthewtrepte 6677092
Add video recording flags to benchmark tests
matthewtrepte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # MuJoCo Menagerie Benchmark Branch | ||
|
|
||
| This branch ports the MuJoCo Menagerie asset swap onto `mtrepte/mujoco_menagerie_v2`, based on current IsaacLab `develop`. | ||
|
|
||
| The goal is to benchmark IsaacLab training environments with robot USD assets from: | ||
|
|
||
| ```text | ||
| ${ISAAC_NUCLEUS_DIR}/Samples/Mujoco_Menagerie | ||
| ``` | ||
|
|
||
| The branch intentionally does not fall back to legacy IsaacLab robot USDs if a Menagerie path or physics variant is missing. Broken paths should fail during launch so they are visible in local smoke runs, Docker runs, and CI-style benchmarks. | ||
|
|
||
| ## What Changed | ||
|
|
||
| - Core robot asset configs now point to MuJoCo Menagerie USD/USDC assets for the covered robots. | ||
| - Training launchers accept `--menagerie-physics-variant` to select Menagerie USD `Physics` variants. | ||
| - The benchmark harness has a Menagerie-specific config at `source/isaaclab_tasks/test/benchmarking/mujoco_configs.yaml`. | ||
| - The benchmark test can emit KPI payloads via `--save_kpi_payload`. | ||
|
|
||
| ## Primary Smoke Command | ||
|
|
||
| Run from the repo root: | ||
|
|
||
| ```bash | ||
| ./isaaclab.sh -p -m pytest -s -x \ | ||
| source/isaaclab_tasks/test/benchmarking/test_environments_training.py \ | ||
| --config_path mujoco_configs.yaml \ | ||
| --mode test \ | ||
| --workflows rsl_rl \ | ||
| --sim-backend physx \ | ||
| --save_kpi_payload | ||
| ``` | ||
|
|
||
| For Newton/MuJoCo physics variant coverage, switch to: | ||
|
|
||
| ```bash | ||
| --sim-backend newton | ||
| ``` | ||
|
|
||
| For longer KPI collection, switch to: | ||
|
|
||
| ```bash | ||
| --mode benchmark | ||
| ``` | ||
|
|
||
| ## Docker A/B Benchmark Shape | ||
|
|
||
| Use the same `mujoco_configs.yaml` in both images: | ||
|
|
||
| - Base image: current `develop`, original IsaacLab robot assets. | ||
| - Menagerie image: this branch, Menagerie robot assets and explicit `--sim-backend physx` or `--sim-backend newton`. | ||
|
|
||
| Compare generated KPI payloads from `logs/kpi.json`. | ||
|
|
||
| ## Docs | ||
|
|
||
| - `asset_mapping.txt`: IsaacLab robot config to Menagerie asset path mapping. | ||
| - `asset_tasks.txt`: representative tasks that exercise each Menagerie-backed asset. | ||
| - `training_benchmark_catalog.txt`: full benchmark matrix and command notes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| MuJoCo Menagerie (Nucleus) <-> IsaacLab_1 v2 mapping notes | ||
| Branch intent: mtrepte/mujoco_menagerie_v2 | ||
|
|
||
| Failure policy | ||
| - No silent fallback. If a resolved path is missing, unreadable, or fails load/sim init, the run must error out immediately so broken assets/paths surface in CI or local runs. Do not substitute legacy USD automatically. | ||
|
|
||
| Menagerie root | ||
| isaaclab.utils.assets.MUJOCO_MENAGERIE_DIR (= ISAAC_NUCLEUS_DIR + "/Samples/Mujoco_Menagerie") | ||
|
|
||
| Replaced targets (current code -> Menagerie USD primary) | ||
| ANYMAL_B_CFG -> anybotics_anymal_b/anymal_b/anymal_b.usda | ||
| ANYMAL_C_CFG -> anybotics_anymal_c/anymal_c/anymal_c.usda | ||
| SPOT_CFG -> boston_dynamics_spot/spot.usda | ||
| UNITREE_GO2_CFG -> unitree_go2/go2.usda | ||
| H1_CFG / H1_MINIMAL_CFG -> unitree_h1/h1/h1.usda | ||
| G1_CFG / G1_MINIMAL_CFG -> unitree_g1/g1/g1.usda | ||
| G1_29DOF_CFG -> unitree_g1/usdex/g1_29dof_rev_1_0.usdc | ||
| ALLEGRO_HAND_CFG -> wonik_allegro/right_hand/right_hand.usda | ||
| SHADOW_HAND_CFG -> shadow_hand/right_hand/right_hand.usda | ||
|
|
||
| Physics variants | ||
| - The branch exposes --menagerie-physics-variant with choices auto, physx, mujoco, none. | ||
| - The benchmark pytest --sim-backend option maps physx -> Menagerie Physics=physx and newton -> Menagerie Physics=mujoco. | ||
| - Use explicit --sim-backend for A/B benchmark reproducibility. | ||
|
|
||
| Not used in this benchmark matrix | ||
| apptronik_apollo, booster_t1, universal_robots_ur5e, robotiq_2f85 standalone | ||
| wonik_allegro left_hand_* unless left-hand tasks are added | ||
| shadow_hand left_hand_* unless left-hand tasks are added | ||
|
|
||
| Ambiguous / split by task | ||
| G1: velocity envs use G1_MINIMAL_CFG / g1.usda. Locomanipulation uses G1_29DOF_CFG / g1_29dof_rev_1_0.usdc. | ||
| H1: rough/flat velocity use H1_MINIMAL_CFG today; full H1_CFG also points at the Menagerie H1 USD. | ||
| Dexsuite: Isaac-Dexsuite-Kuka-Allegro-* uses the KUKA_ALLEGRO_CFG bundle, not the Wonik Menagerie Allegro hand. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| Representative gym tasks that exercise each Menagerie-backed robot asset. | ||
|
|
||
| Rule: one primary task id per robot or distinct USD role. Omit -Play and duplicate variants. | ||
| Workflows are the registered training entry points for the task. | ||
|
|
||
| task_id | workflows | asset / note | ||
| Isaac-Velocity-Rough-Anymal-B-v0 | rsl_rl, skrl | ANYMAL_B | ||
| Isaac-Velocity-Rough-Anymal-C-v0 | rsl_rl, rl_games, skrl | ANYMAL_C | ||
| Isaac-Velocity-Flat-Spot-v0 | rsl_rl, skrl | SPOT (no rough task in tree) | ||
| Isaac-Velocity-Rough-Unitree-Go2-v0 | rsl_rl, skrl | UNITREE_GO2 | ||
| Isaac-Velocity-Rough-H1-v0 | rsl_rl, skrl | H1_MINIMAL velocity | ||
| Isaac-Velocity-Rough-G1-v0 | rsl_rl, skrl | G1_MINIMAL velocity | ||
| Isaac-PickPlace-Locomanipulation-G1-Abs-v0 | robomimic_bc | G1_29DOF distinct Menagerie USD role | ||
| Isaac-PickPlace-FixedBaseUpperBodyIK-G1-Abs-v0 | none registered | G1_29DOF IK-only; add workflows before benchmarking | ||
| Isaac-Repose-Cube-Allegro-v0 | rsl_rl, rl_games, skrl | ALLEGRO_HAND manager-based | ||
| Isaac-Repose-Cube-Allegro-Direct-v0 | rsl_rl, rl_games, skrl | ALLEGRO_HAND direct | ||
| Isaac-Repose-Cube-Shadow-Direct-v0 | rsl_rl, rl_games, skrl | SHADOW_HAND direct | ||
|
|
||
| Automated pytest benchmark coverage | ||
| source/isaaclab_tasks/test/benchmarking/mujoco_configs.yaml currently uses the flat velocity variants plus the direct Allegro and Shadow hand tasks for RSL-RL smoke/benchmark coverage: | ||
| Isaac-Velocity-Flat-Anymal-B-v0 | ||
| Isaac-Velocity-Flat-Anymal-C-v0 | ||
| Isaac-Velocity-Flat-Spot-v0 | ||
| Isaac-Velocity-Flat-Unitree-Go2-v0 | ||
| Isaac-Velocity-Flat-H1-v0 | ||
| Isaac-Velocity-Flat-G1-v0 | ||
| Isaac-Repose-Cube-Allegro-Direct-v0 | ||
| Isaac-Repose-Cube-Shadow-Direct-v0 | ||
|
|
||
| Not listed | ||
| - Isaac-Repose-Cube-Shadow-* OpenAI / Vision / Benchmark variants use the same Shadow Menagerie target; add them only if those observation pipelines are in scope. | ||
| - Isaac-Dexsuite-Kuka-Allegro-* uses KUKA_ALLEGRO_CFG / kuka.usd, not the Wonik Menagerie Allegro hand. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Training benchmark catalog - MuJoCo Menagerie asset swap | ||
|
|
||
| Purpose | ||
| Matrix for comparing: | ||
| A) develop Docker image + original IsaacLab robot USDs | ||
| B) this branch + Menagerie assets + Physics=mujoco / Newton backend | ||
| C) this branch + Menagerie assets + Physics=physx / PhysX backend | ||
|
|
||
| Menagerie assets resolve through MUJOCO_MENAGERIE_DIR under Samples/Mujoco_Menagerie. | ||
| The benchmark should use explicit --sim-backend values so the chosen physics variant is clear. | ||
|
|
||
| Workflow column lists gym *_cfg_entry_point keys. | ||
|
|
||
| Columns | ||
| task_id | workflows | Menagerie asset / cfg | notes | ||
|
|
||
| --- Locomotion / velocity (Menagerie-backed on this branch) --- | ||
| Isaac-Velocity-Rough-Anymal-B-v0 | rsl_rl, skrl | ANYMAL_B_CFG / anymal_b.usda | | ||
| Isaac-Velocity-Rough-Anymal-C-v0 | rsl_rl, rl_games, skrl | ANYMAL_C_CFG / anymal_c.usda | | ||
| Isaac-Velocity-Flat-Spot-v0 | rsl_rl, skrl | SPOT_CFG / spot.usda | no rough task registered | ||
| Isaac-Velocity-Rough-Unitree-Go2-v0 | rsl_rl, skrl | UNITREE_GO2_CFG / go2.usda | | ||
| Isaac-Velocity-Rough-H1-v0 | rsl_rl, skrl | H1_MINIMAL_CFG -> h1.usda | full H1_CFG also Menagerie | ||
| Isaac-Velocity-Rough-G1-v0 | rsl_rl, skrl | G1_MINIMAL_CFG -> g1.usda | | ||
|
|
||
| --- Manipulation / in-hand (Menagerie-backed) --- | ||
| Isaac-Repose-Cube-Allegro-v0 | rsl_rl, rl_games, skrl | ALLEGRO_HAND_CFG / wonik_allegro right hand | | ||
| Isaac-Repose-Cube-Allegro-Direct-v0 | rsl_rl, rl_games, skrl | same as Allegro manager task | | ||
| Isaac-Repose-Cube-Shadow-Direct-v0 | rsl_rl, rl_games, skrl | SHADOW_HAND_CFG / shadow_hand right hand | | ||
| Isaac-PickPlace-Locomanipulation-G1-Abs-v0 | robomimic_bc | G1_29DOF_CFG -> g1_29dof_rev usdc | | ||
|
|
||
| --- Not in Menagerie swap matrix --- | ||
| Isaac-Dexsuite-Kuka-Allegro-* | various | KUKA + kuka.usd bundle, not Wonik Menagerie Allegro | | ||
| Isaac-Velocity-*-Unitree-A1-v0 | various | UNITREE_A1_CFG still IsaacLab nucleus a1.usd | | ||
| Isaac-Velocity-*-Anymal-D-v0 | various | ANYMAL_D_CFG still IsaacLab nucleus ANYmal-D USD | | ||
|
|
||
| Pytest smoke command | ||
| ./isaaclab.sh -p -m pytest -s -x \ | ||
| source/isaaclab_tasks/test/benchmarking/test_environments_training.py \ | ||
| --config_path mujoco_configs.yaml \ | ||
| --mode test \ | ||
| --workflows rsl_rl \ | ||
| --sim-backend physx \ | ||
| --save_kpi_payload | ||
|
|
||
| Newton / MuJoCo variant | ||
| Replace --sim-backend physx with --sim-backend newton. | ||
|
|
||
| Longer KPI benchmark | ||
| Replace --mode test with --mode benchmark. | ||
|
|
||
| Single-task example | ||
| ./isaaclab.sh -p -m pytest -s -x \ | ||
| source/isaaclab_tasks/test/benchmarking/test_environments_training.py \ | ||
| --config_path mujoco_configs.yaml \ | ||
| --mode test \ | ||
| --workflows rsl_rl \ | ||
| --sim-backend physx \ | ||
| --save_kpi_payload \ | ||
| -k "Isaac-Velocity-Flat-Anymal-B-v0" | ||
|
|
||
| Related | ||
| asset_mapping.txt - robot config to Menagerie path mapping | ||
| asset_tasks.txt - representative task per Menagerie-backed robot asset | ||
| source/isaaclab_tasks/test/benchmarking/mujoco_configs.yaml - automated benchmark config |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
torch.backends.cudnn.flags(enabled=False)now wraps everyActuatorNetLSTM.computecall. The comment explains this as a workaround for a specific scenario where Newton initializes before the first TorchScript LSTM call, but the guard applies universally — every user running an Anymal-B/C environment with the LSTM actuator pays the penalty of the slower non-cuDNN CUDA LSTM path on every physics step. The fix should be conditional: checktorch.backends.cudnn.is_available()at the call site and only suppress cuDNN when it is genuinely unavailable, leaving the fast path intact for everyone else.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!