mani_skill.utils.wrappers.action_repeat#
Classes#
Wraps a |
Module Contents#
- class mani_skill.utils.wrappers.action_repeat.ActionRepeatWrapper(env, repeat)[source]#
Bases:
gymnasium.WrapperWraps a
gymnasium.Envto allow a modular transformation of thestep()andreset()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
action_space,observation_spaceandmetadataattributes, without changing the underlying environment’s attributes. Moreover, the behavior of thestep()andreset()methods can be changed by these wrappers.Some attributes (
spec,render_mode,np_random) will point back to the wrapper’s environment (i.e. to the corresponding attributes ofenv).Note
If you inherit from
Wrapper, don’t forget to callsuper().__init__(env)- Parameters:
repeat (int) –
- _update_dict_values(from_dict, to_dict, not_dones)[source]#
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.
- Parameters:
from_dict (dict) –
to_dict (dict) –
not_dones (mani_skill.utils.structs.types.Array) –
- step(action)[source]#
Uses the
step()of theenvthat can be overwritten to change the returned data.
- property base_env: mani_skill.envs.sapien_env.BaseEnv[source]#
- Return type: