mani_skill.utils.wrappers.action_repeat ======================================= .. py:module:: mani_skill.utils.wrappers.action_repeat Classes ------- .. autoapisummary:: mani_skill.utils.wrappers.action_repeat.ActionRepeatWrapper Module Contents --------------- .. py:class:: ActionRepeatWrapper(env, repeat) Bases: :py:obj:`gymnasium.Wrapper` Wraps a :class:`gymnasium.Env` to allow a modular transformation of the :meth:`step` and :meth:`reset` methods. This class is the base class of all wrappers to change the behavior of the underlying environment. Wrappers that inherit from this class can modify the :attr:`action_space`, :attr:`observation_space` and :attr:`metadata` attributes, without changing the underlying environment's attributes. Moreover, the behavior of the :meth:`step` and :meth:`reset` methods can be changed by these wrappers. Some attributes (:attr:`spec`, :attr:`render_mode`, :attr:`np_random`) will point back to the wrapper's environment (i.e. to the corresponding attributes of :attr:`env`). .. note:: If you inherit from :class:`Wrapper`, don't forget to call ``super().__init__(env)`` .. py:method:: _update_dict_values(from_dict, to_dict, not_dones) Recursively updates the values of a dictionary with the values from another dictionary but only for the envs that are not done. This allows us to update the observation and info dictionaries with new values only for the environments that are not done. If a sub-env becomes done, its future step data will be discarded since not_dones will be false for this sub-environment. Therefore the final observation/info will come from the true last step of the sub-env. .. py:method:: step(action) Uses the :meth:`step` of the :attr:`env` that can be overwritten to change the returned data. .. py:property:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:property:: num_envs .. py:attribute:: repeat