Skip to content

[mujoco] Add native MyoSuite EnvPool integration#400

Merged
Trinkle23897 merged 139 commits into
mainfrom
jiayi/myosuite-native-20260430
May 6, 2026
Merged

[mujoco] Add native MyoSuite EnvPool integration#400
Trinkle23897 merged 139 commits into
mainfrom
jiayi/myosuite-native-20260430

Conversation

@Trinkle23897

Copy link
Copy Markdown
Collaborator

Description

Adds a native C++ EnvPool integration for the pinned MyoSuite v2.11.6 surface under the MuJoCo family. The runtime loads generated upstream metadata and assets from third_party/myosuite/ and registers the full official ID set plus EnvPool aliases without importing the official Python package at runtime.

Key review points:

  • Native runtime entrypoint and task implementation live in envpool/mujoco/myosuite/.
  • Upstream source, SimHive asset wiring, generated registry metadata, pinned oracle requirements, and the MuJoCo 3.6 MjSpec compatibility patch live under third_party/myosuite/.
  • Official MyoSuite is used only by tests and doc-generation tooling as a pinned oracle.
  • Nine upstream IDs that fail official oracle instantiation in this pinned NumPy 2 test environment are excluded only from oracle tests; they remain registered and covered by EnvPool registry/determinism tests.
  • Documentation includes the MyoSuite environment page and the generated EnvPool-vs-official render comparison image.

Motivation and Context

MyoSuite exposes a large MuJoCo task surface that was not available through EnvPool. This adds a packaged native implementation so users can create MyoBase/Reorient, Walk/Terrain, MyoChallenge, and MyoDM-style registered IDs through EnvPool without a Python runtime bridge.

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • New environment (non-breaking change which adds 3rd-party environment)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Implemented Tasks

  • Register the full pinned MyoSuite ID surface and EnvPool aliases.
  • Add native MuJoCo-backed MyoSuite runtime, metadata/assets, tests, and docs.
  • Add oracle, determinism, registry, render, docs, and release-wheel validation coverage.

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format (required)
  • I have checked the code using make lint (required)
  • I have ensured make bazel-test pass. (required)

Validation run:

  • make ruff py-format cpplint clang-format buildifier
  • make mypy
  • bazel test --config=test --cache_test_results=no --test_output=errors //envpool/mujoco:myosuite_test //envpool/mujoco:myosuite_oracle_align_test //envpool/mujoco:myosuite_render_test
  • make BAZEL_TEST_TARGETS='//envpool/mujoco:mujoco_render_test //envpool/mujoco:mujoco_dmc_render_test //envpool/mujoco:robotics_test' bazel-test
  • make BAZEL_TEST_TARGETS='//envpool:make_test' bazel-test
  • make bazel-test (62/62 tests passed locally)
  • make -C docs html (succeeds; 4 existing cpp_interface.rst Breathe warnings remain)
  • make bazel-release
  • make pypi-wheel
  • installed the generated wheel in a fresh venv and ran make release-test
  • git diff --cached --check

Comment thread third_party/myosuite/generate_render_sample.py Fixed
Comment thread envpool/entry.py Fixed
Comment thread envpool/mujoco/myosuite/myosuite_oracle_align_test.py Fixed
Comment thread envpool/mujoco/myosuite/myosuite_render_test.py Fixed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da8f6a0690

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread envpool/mujoco/myosuite/myosuite_env.h Outdated
Comment thread envpool/mujoco/myosuite/myosuite_env.h Outdated
Comment thread envpool/mujoco/myosuite/myosuite_oracle_align_test.py Fixed
@Trinkle23897
Trinkle23897 force-pushed the jiayi/myosuite-native-20260430 branch from f4a6fac to e3876aa Compare May 1, 2026 02:15
@Trinkle23897
Trinkle23897 force-pushed the jiayi/myosuite-native-20260430 branch 6 times, most recently from ccddf2e to f593d76 Compare May 6, 2026 02:25
Comment thread envpool/entry.py
import envpool.mujoco.dmc.registration # noqa: F401
import envpool.mujoco.gym.registration # noqa: F401
import envpool.mujoco.metaworld.registration # noqa: F401
import envpool.mujoco.myosuite.registration # noqa: F401
@Trinkle23897
Trinkle23897 force-pushed the jiayi/myosuite-native-20260430 branch 5 times, most recently from 68a799e to 0eb40fe Compare May 6, 2026 08:56
@Trinkle23897
Trinkle23897 force-pushed the jiayi/myosuite-native-20260430 branch from 0eb40fe to 9e19bc2 Compare May 6, 2026 09:57
@Trinkle23897 Trinkle23897 linked an issue May 6, 2026 that may be closed by this pull request
@Trinkle23897
Trinkle23897 merged commit 1c7d8c3 into main May 6, 2026
13 checks passed
@Trinkle23897
Trinkle23897 deleted the jiayi/myosuite-native-20260430 branch May 6, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Myosuite support

1 participant