mani_skill.utils.wrappers.flatten ================================= .. py:module:: mani_skill.utils.wrappers.flatten Classes ------- .. autoapisummary:: mani_skill.utils.wrappers.flatten.FlattenActionSpaceWrapper mani_skill.utils.wrappers.flatten.FlattenObservationWrapper mani_skill.utils.wrappers.flatten.FlattenRGBDObservationWrapper Module Contents --------------- .. py:class:: FlattenActionSpaceWrapper(env) Bases: :py:obj:`gymnasium.ActionWrapper` Flattens the action space. The original action space must be spaces.Dict .. py:method:: action(action) Returns a modified action before :meth:`step` is called. :param action: The original :meth:`step` actions :returns: The modified actions .. py:attribute:: _orig_single_action_space .. py:property:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:attribute:: single_action_space .. py:class:: FlattenObservationWrapper(env) Bases: :py:obj:`gymnasium.ObservationWrapper` Flattens the observations into a single vector .. py:method:: observation(observation) Returns a modified observation. :param observation: The :attr:`env` observation :returns: The modified observation .. py:property:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:class:: FlattenRGBDObservationWrapper(env, rgb=True, depth=True, state=True, sep_depth=True) Bases: :py:obj:`gymnasium.ObservationWrapper` Flattens the rgbd mode observations into a dictionary with two keys, "rgbd" and "state" :param rgb: Whether to include rgb images in the observation :type rgb: bool :param depth: Whether to include depth images in the observation :type depth: bool :param state: Whether to include state data in the observation :type state: bool :param sep_depth: Whether to separate depth and rgb images in the observation. Default is True. :type sep_depth: bool Note that the returned observations will have a "rgb" or "depth" key depending on the rgb/depth bool flags, and will always have a "state" key. If sep_depth is False, rgb and depth will be merged into a single "rgbd" key. .. py:method:: observation(observation) Returns a modified observation. :param observation: The :attr:`env` observation :returns: The modified observation .. py:attribute:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:attribute:: include_depth :value: True .. py:attribute:: include_rgb :value: True .. py:attribute:: include_state :value: True .. py:attribute:: sep_depth :value: True