diff --git a/source/extensions/omni.isaac.lab/config/extension.toml b/source/extensions/omni.isaac.lab/config/extension.toml index 13104e11538..283d1bc9214 100644 --- a/source/extensions/omni.isaac.lab/config/extension.toml +++ b/source/extensions/omni.isaac.lab/config/extension.toml @@ -1,7 +1,7 @@ [package] # Note: Semantic Versioning is used: https://semver.org/ -version = "0.19.3" +version = "0.19.4" # Description title = "Isaac Lab framework for Robot Learning" diff --git a/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst b/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst index 7c2d8e8f91a..93699ee7b4f 100644 --- a/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst +++ b/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst @@ -1,6 +1,18 @@ Changelog --------- +0.19.4 (2024-07-13) +~~~~~~~~~~~~~~~~~~~ + +Fixed +^^^^^ + +* Added the call to "startup" events when using the :class:`~omni.isaac.lab.envs.ManagerBasedEnv` class. + Earlier, the "startup" events were not being called when the environment was initialized. This issue + did not occur when using the :class:`~omni.isaac.lab.envs.ManagerBasedRLEnv` class since the "startup" + events were called in the constructor. + + 0.19.3 (2024-07-13) ~~~~~~~~~~~~~~~~~~~ diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py index c1d0442f8a0..c7603cf3174 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py @@ -223,6 +223,12 @@ def load_managers(self): self.event_manager = EventManager(self.cfg.events, self) print("[INFO] Event Manager: ", self.event_manager) + # perform events at the start of the simulation + # in-case a child implementation creates other managers, the randomization should happen + # when all the other managers are created + if self.__class__ == ManagerBasedEnv and "startup" in self.event_manager.available_modes: + self.event_manager.apply(mode="startup") + """ Operations - MDP. """ diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_rl_env.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_rl_env.py index ba9a736a11c..9f08d1ab527 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_rl_env.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_rl_env.py @@ -107,8 +107,10 @@ def load_managers(self): # -- command manager self.command_manager: CommandManager = CommandManager(self.cfg.commands, self) print("[INFO] Command Manager: ", self.command_manager) + # call the parent class to load the managers for observations and actions. super().load_managers() + # prepare the managers # -- termination manager self.termination_manager = TerminationManager(self.cfg.terminations, self) @@ -119,8 +121,10 @@ def load_managers(self): # -- curriculum manager self.curriculum_manager = CurriculumManager(self.cfg.curriculum, self) print("[INFO] Curriculum Manager: ", self.curriculum_manager) + # setup the action and observation spaces for Gym self._configure_gym_env_spaces() + # perform events at the start of the simulation if "startup" in self.event_manager.available_modes: self.event_manager.apply(mode="startup") diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/managers/event_manager.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/managers/event_manager.py index dcf5dda18fe..f8387abef08 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/managers/event_manager.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/managers/event_manager.py @@ -19,7 +19,7 @@ from .manager_term_cfg import EventTermCfg if TYPE_CHECKING: - from omni.isaac.lab.envs import ManagerBasedRLEnv + from omni.isaac.lab.envs import ManagerBasedEnv class EventManager(ManagerBase): @@ -53,10 +53,10 @@ class EventManager(ManagerBase): """ - _env: ManagerBasedRLEnv + _env: ManagerBasedEnv """The environment instance.""" - def __init__(self, cfg: object, env: ManagerBasedRLEnv): + def __init__(self, cfg: object, env: ManagerBasedEnv): """Initialize the event manager. Args: @@ -295,7 +295,7 @@ class RandomizationManager(EventManager): renamed to EventManager as it is more general purpose. The RandomizationManager will be removed in v0.4.0. """ - def __init__(self, cfg: object, env: ManagerBasedRLEnv): + def __init__(self, cfg: object, env: ManagerBasedEnv): """Initialize the randomization manager. Args: diff --git a/tools/per_test_timeouts.py b/tools/per_test_timeouts.py index 5e2b9a42224..d221f3c9709 100644 --- a/tools/per_test_timeouts.py +++ b/tools/per_test_timeouts.py @@ -9,4 +9,8 @@ """ PER_TEST_TIMEOUTS = { "test_environments.py": 1200, # This test runs through all the environments for 100 steps each + "test_env_rendering_logic.py": 200, + "test_rsl_rl_wrapper.py": 200, + "test_sb3_wrapper.py": 200, + "test_skrl_wrapper.py": 200, }