Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Avoided loading MoviePy's unrelated editing dependencies when importing the video recorder.
2 changes: 1 addition & 1 deletion source/isaaclab/isaaclab/envs/utils/video_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import numpy as np

try:
from moviepy.editor import ImageSequenceClip
from moviepy.video.io.ImageSequenceClip import ImageSequenceClip
except ImportError:
ImageSequenceClip = None # type: ignore[assignment,misc]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Fixed Isaac Sim crashing at startup in OpenBLAS's at-fork handler when ``moviepy`` is installed: the
reinforcement learning entry points imported the environment runtime, and with it the video recorder's
``moviepy`` and SciPy, before the launch.
5 changes: 4 additions & 1 deletion source/isaaclab_rl/isaaclab_rl/entrypoints/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from PIL import Image

from isaaclab.app import LoadingScreen
from isaaclab.envs import DirectMARLEnvCfg, DirectRLEnvCfg, ManagerBasedRLEnvCfg, multi_agent_to_single_agent
from isaaclab.envs import DirectMARLEnvCfg, DirectRLEnvCfg, ManagerBasedRLEnvCfg
from isaaclab.envs.utils.video_recorder_cfg import VideoRecorderCfg
from isaaclab.renderers.renderer_cfg import RendererCfg
from isaaclab.utils.assets import retrieve_file_path
Expand Down Expand Up @@ -501,6 +501,9 @@ def create_isaaclab_env(

env = WarpFrontend.build_env(env_cfg, task)
if convert_marl_to_single_agent and isinstance(env.unwrapped.cfg, DirectMARLEnvCfg):
# Import the environment runtime only after simulation launch.
from isaaclab.envs import multi_agent_to_single_agent

env = multi_agent_to_single_agent(env)
return env

Expand Down
1 change: 1 addition & 0 deletions source/isaaclab_rl/test/test_entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
[
("import isaaclab_rl", ["isaaclab_rl.entrypoints", "torch"]),
("import isaaclab_rl.entrypoints.backends", ["torch"]),
("import isaaclab_rl.entrypoints.common", ["isaaclab.envs.direct_marl_env", "moviepy"]),
# the LEAPP runtime must only load once the simulation has launched
("import isaaclab_rl.entrypoints.backends.export_rsl_rl", ["leapp", "isaaclab.utils.leapp"]),
("import isaaclab_rl.rl_games", ["isaaclab_rl.rl_games.rl_games", "rl_games", "torch"]),
Expand Down
Loading