From 94a7909042e846c496bcf54f375a5d0963da2b31 Mon Sep 17 00:00:00 2001 From: Mark Towers Date: Thu, 11 Apr 2024 22:45:58 +0100 Subject: [PATCH] Update `env.model.nbvh` for mujoco>=3.1.4 (#1012) --- tests/envs/mujoco/test_mujoco_v5.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/envs/mujoco/test_mujoco_v5.py b/tests/envs/mujoco/test_mujoco_v5.py index 6896aad90..c7a5fb0c0 100644 --- a/tests/envs/mujoco/test_mujoco_v5.py +++ b/tests/envs/mujoco/test_mujoco_v5.py @@ -593,8 +593,12 @@ def test_model_object_count(version: str): assert env.model.nv == 11 assert env.model.nu == 7 assert env.model.nbody == 13 - if mujoco.__version__ >= "3.1.2": + if mujoco.__version__ >= "3.1.4": + assert env.model.nbvh == 7 + elif mujoco.__version__ >= "3.1.2": assert env.model.nbvh == 8 + else: + assert env.model.nbvh == 18 assert env.model.njnt == 11 assert env.model.ngeom == 21 assert env.model.ntendon == 0