From 04705baa1b0bdda1fcc7ba16f8ef3b7cf3e7eeb1 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 24 Jul 2024 17:22:51 +0200 Subject: [PATCH] Allow no camera to be passed --- src/jaxsim/mujoco/loaders.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/jaxsim/mujoco/loaders.py b/src/jaxsim/mujoco/loaders.py index e18faef79..4cd00bf89 100644 --- a/src/jaxsim/mujoco/loaders.py +++ b/src/jaxsim/mujoco/loaders.py @@ -532,7 +532,12 @@ def convert( model_name: str | None = None, plane_normal: tuple[float, float, float] = (0, 0, 1), heightmap: bool | None = None, - cameras: list[dict[str, str]] | dict[str, str] | None = None, + cameras: ( + MujocoCamera + | Sequence[MujocoCamera] + | dict[str, str] + | Sequence[dict[str, str]] + ) = (), ) -> tuple[str, dict[str, Any]]: """ Converts a URDF file to a Mujoco MJCF string. @@ -574,7 +579,12 @@ def convert( model_name: str | None = None, plane_normal: tuple[float, float, float] = (0, 0, 1), heightmap: bool | None = None, - cameras: list[dict[str, str]] | dict[str, str] | None = None, + cameras: ( + MujocoCamera + | Sequence[MujocoCamera] + | dict[str, str] + | Sequence[dict[str, str]] + ) = (), ) -> tuple[str, dict[str, Any]]: """ Converts a SDF file to a Mujoco MJCF string.