diff --git a/pyproject.toml b/pyproject.toml index c58094804..d5886fed5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ classic-control = ["pygame >=2.1.3"] classic_control = ["pygame >=2.1.3"] # kept for backward compatibility mujoco-py = ["mujoco-py >=2.1,<2.2", "cython<3"] mujoco_py = ["mujoco-py >=2.1,<2.2", "cython<3"] # kept for backward compatibility -mujoco = ["mujoco >=2.1.5, <= 3.1.1", "imageio >=2.14.1"] +mujoco = ["mujoco >=2.1.5", "imageio >=2.14.1"] toy-text = ["pygame >=2.1.3"] toy_text = ["pygame >=2.1.3"] # kept for backward compatibility jax = ["jax >=0.4.0", "jaxlib >=0.4.0", "flax >= 0.5.0"] @@ -67,7 +67,7 @@ all = [ "mujoco-py >=2.1,<2.2", "cython<3", # mujoco - "mujoco >=2.1.5, <=3.1.1", + "mujoco >=2.1.5", "imageio >=2.14.1", # toy-text "pygame >=2.1.3", diff --git a/tests/envs/mujoco/test_mujoco_v5.py b/tests/envs/mujoco/test_mujoco_v5.py index 20ea9c028..2b92b3665 100644 --- a/tests/envs/mujoco/test_mujoco_v5.py +++ b/tests/envs/mujoco/test_mujoco_v5.py @@ -588,7 +588,8 @@ def test_model_object_count(version: str): assert env.model.nv == 11 assert env.model.nu == 7 assert env.model.nbody == 13 - assert env.model.nbvh == 18 + if mujoco.__version__ >= "3.1.2": + assert env.model.nbvh == 8 assert env.model.njnt == 11 assert env.model.ngeom == 21 assert env.model.ntendon == 0 @@ -599,7 +600,8 @@ def test_model_object_count(version: str): assert env.model.nv == 4 assert env.model.nu == 2 assert env.model.nbody == 5 - assert env.model.nbvh == 5 + if mujoco.__version__ >= "3.1.2": + assert env.model.nbvh == 3 assert env.model.njnt == 4 assert env.model.ngeom == 10 assert env.model.ntendon == 0 @@ -610,7 +612,8 @@ def test_model_object_count(version: str): assert env.model.nv == 5 assert env.model.nu == 2 assert env.model.nbody == 4 - assert env.model.nbvh == 4 + if mujoco.__version__ >= "3.1.2": + assert env.model.nbvh == 0 assert env.model.njnt == 5 assert env.model.ngeom == 4 assert env.model.ntendon == 0