From a14022cf9ab1551130b376588da386ccd9e84315 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Thu, 4 Apr 2024 09:55:26 +0200 Subject: [PATCH] Fix RodModelToMjcf.convert with no user camera specified --- src/jaxsim/mujoco/loaders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jaxsim/mujoco/loaders.py b/src/jaxsim/mujoco/loaders.py index 684322a40..32b7a4a5a 100644 --- a/src/jaxsim/mujoco/loaders.py +++ b/src/jaxsim/mujoco/loaders.py @@ -476,7 +476,7 @@ def convert( ) # Add user-defined camera - cameras = cameras if cameras is not None else {} + cameras = cameras if cameras is not None else [] for camera in cameras if isinstance(cameras, list) else [cameras]: mj_camera = MujocoCamera.build(**camera) _ = ET.SubElement(