Skip to content

Commit 044fca9

Browse files
Merge pull request #182 from Balint-H:main
PiperOrigin-RevId: 797976253 Change-Id: I36b3cb899c7a39b773312ee40f115ed50a70c58c
2 parents 58c5bb2 + 0c862a9 commit 044fca9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

mujoco_playground/_src/locomotion/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
from mujoco_playground._src.locomotion.t1 import randomize as t1_randomize
4343

4444

45-
mjx_env.ensure_menagerie_exists() # Ensure menagerie exists when module is imported.
46-
4745
_envs = {
4846
"ApolloJoystickFlatTerrain": functools.partial(
4947
apollo_joystick.Joystick, task="flat_terrain"
@@ -181,6 +179,7 @@ def load(
181179
Returns:
182180
An instance of the environment.
183181
"""
182+
mjx_env.ensure_menagerie_exists() # Ensure menagerie exists when environment is loaded.
184183
if env_name not in _envs:
185184
raise ValueError(
186185
f"Env '{env_name}' not found. Available envs: {_cfgs.keys()}"

mujoco_playground/_src/manipulation/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
from mujoco_playground._src.manipulation.leap_hand import rotate_z as leap_rotate_z
3131

3232

33-
mjx_env.ensure_menagerie_exists() # Ensure menagerie exists when module is imported.
34-
3533
_envs = {
3634
"AlohaHandOver": aloha_handover.HandOver,
3735
"AlohaSinglePegInsertion": aloha_peg.SinglePegInsertion,
@@ -110,6 +108,7 @@ def load(
110108
Returns:
111109
An instance of the environment.
112110
"""
111+
mjx_env.ensure_menagerie_exists() # Ensure menagerie exists when environment is loaded.
113112
if env_name not in _envs:
114113
raise ValueError(
115114
f"Env '{env_name}' not found. Available envs: {_cfgs.keys()}"

0 commit comments

Comments
 (0)