mani_skill.utils.registration ============================= .. py:module:: mani_skill.utils.registration Attributes ---------- .. autoapisummary:: mani_skill.utils.registration.REGISTERED_ENVS Classes ------- .. autoapisummary:: mani_skill.utils.registration.EnvSpec mani_skill.utils.registration.TimeLimitWrapper Functions --------- .. autoapisummary:: mani_skill.utils.registration.make mani_skill.utils.registration.make_vec mani_skill.utils.registration.register mani_skill.utils.registration.register_env Module Contents --------------- .. py:class:: EnvSpec(uid, cls, max_episode_steps=None, asset_download_ids = [], default_kwargs = None) .. py:method:: make(**kwargs) .. py:attribute:: asset_download_ids :value: [] .. py:attribute:: cls .. py:attribute:: default_kwargs .. py:property:: gym_spec Return a gym EnvSpec for this env .. py:attribute:: max_episode_steps :value: None .. py:attribute:: uid .. py:class:: TimeLimitWrapper(env, max_episode_steps) Bases: :py:obj:`gymnasium.Wrapper` like the standard gymnasium timelimit wrapper but fixes truncated variable to be a torch tensor and batched .. py:method:: step(action) Uses the :meth:`step` of the :attr:`env` that can be overwritten to change the returned data. .. py:attribute:: _max_episode_steps .. py:property:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:function:: make(env_id, **kwargs) Instantiate a ManiSkill environment. :param env_id: Environment ID. :type env_id: str :param as_gym: Add TimeLimit wrapper as gym. :type as_gym: bool, optional :param \*\*kwargs: Keyword arguments to pass to the environment. .. py:function:: make_vec(env_id, **kwargs) .. py:function:: register(name, cls, max_episode_steps=None, asset_download_ids = [], default_kwargs = None) Register a ManiSkill environment. .. py:function:: register_env(uid, max_episode_steps=None, override=False, asset_download_ids = [], **kwargs) A decorator to register ManiSkill environments. :param uid: unique id of the environment. :type uid: str :param max_episode_steps: maximum number of steps in an episode. :type max_episode_steps: int :param asset_download_ids: asset download ids the environment depends on. When environments are created this list is checked to see if the user has all assets downloaded and if not, prompt the user if they wish to download them. :type asset_download_ids: list[str] :param override: whether to override the environment if it is already registered. :type override: bool .. rubric:: Notes - `max_episode_steps` is processed differently from other keyword arguments in gym. `gym.make` wraps the env with `gym.wrappers.TimeLimit` to limit the maximum number of steps. - `gym.EnvSpec` uses kwargs instead of **kwargs! .. py:data:: REGISTERED_ENVS :type: dict[str, EnvSpec]