Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Expand Up @@ -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.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down