From 6fbb6e7215583fcef282afe26a8de11d861de22c Mon Sep 17 00:00:00 2001 From: dmarzoug Date: Thu, 7 Mar 2024 16:00:11 +0100 Subject: [PATCH 1/2] updated version to v1.0.2 --- pyproject.toml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aefa149..18abe7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "moojoco" -version = "1.0.1" +version = "1.0.2" authors = [ { name = "Dries Marzougui", email = "dries.marzougui@gmail.com" }, ] diff --git a/setup.py b/setup.py index c6ffc2e..9fc791d 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='moojoco', - version='1.0.1', + version='1.0.2', description='A unified framework for implementing and interfacing with MuJoCo and MuJoCo-XLA simulation ' 'environments.', long_description=readme, From 051610dd62ff9e1ee91fa955ab7216252dd1f6ea Mon Sep 17 00:00:00 2001 From: dmarzoug Date: Fri, 8 Mar 2024 10:33:54 +0100 Subject: [PATCH 2/2] rgb renderer fix: update model of renderer --- moojoco/environment/base.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/moojoco/environment/base.py b/moojoco/environment/base.py index 6f9e4b4..a01fac7 100644 --- a/moojoco/environment/base.py +++ b/moojoco/environment/base.py @@ -280,11 +280,7 @@ def _get_mj_models_and_datas_to_render( def render(self, state: BaseEnvState) -> List[RenderFrame] | None: camera_ids = self.environment_configuration.camera_ids or [-1] - try: - mj_models, mj_datas = self._get_mj_models_and_datas_to_render(state=state) - except ValueError: - # Waiting on https://github.com/google-deepmind/mujoco/issues/1379 - return None + mj_models, mj_datas = self._get_mj_models_and_datas_to_render(state=state) frames = [] for i, (model, data) in enumerate(zip(mj_models, mj_datas)): @@ -301,6 +297,7 @@ def render(self, state: BaseEnvState) -> List[RenderFrame] | None: return renderer.render(render_mode="human", camera_id=camera_ids[0]) else: for camera_id in camera_ids: + renderer._model = model renderer.update_scene(data=data, camera=camera_id) frame = renderer.render()[:, :, ::-1] frames.append(frame)