From b397a757bb28c211c73a544e20b1201a5cbd5918 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 09:19:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/lerobot/envs/factory.py | 4 +++- src/lerobot/envs/libero.py | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lerobot/envs/factory.py b/src/lerobot/envs/factory.py index 649d8a017..be49a9990 100644 --- a/src/lerobot/envs/factory.py +++ b/src/lerobot/envs/factory.py @@ -35,7 +35,9 @@ def make_env_config(env_type: str, **kwargs) -> EnvConfig: raise ValueError(f"Policy type '{env_type}' is not available.") -def make_env(cfg: EnvConfig, n_envs: int = 1, use_async_envs: bool = False) -> gym.vector.VectorEnv | dict[str, dict[int, gym.vector.VectorEnv]]: +def make_env( + cfg: EnvConfig, n_envs: int = 1, use_async_envs: bool = False +) -> gym.vector.VectorEnv | dict[str, dict[int, gym.vector.VectorEnv]]: """Makes a gym vector environment according to the config. Args: diff --git a/src/lerobot/envs/libero.py b/src/lerobot/envs/libero.py index a897eb42d..cf01386c3 100644 --- a/src/lerobot/envs/libero.py +++ b/src/lerobot/envs/libero.py @@ -147,7 +147,10 @@ def get_libero_dummy_action(): """Get dummy/no-op action, used to roll out the simulation while the robot does nothing.""" return [0, 0, 0, 0, 0, 0, -1] + ACTION_DIM = 8 + + class LiberoEnv(gym.Env): metadata = {"render_modes": ["rgb_array"], "render_fps": 80} @@ -178,7 +181,7 @@ class LiberoEnv(gym.Env): self.camera_name = camera_name.split( "," ) # agentview_image (main) or robot0_eye_in_hand_image (wrist) - + # Map raw camera names to "image1" and "image2". # The preprocessing step `preprocess_observation` will then prefix these with `.images.*`, # following the LeRobot convention (e.g., `observation.images.image`, `observation.images.image2`).