mani_skill.utils.wrappers.visual_encoders#

Classes#

VisualEncoderWrapper

Modify observations from Env.reset() and Env.step() using observation() function.

Module Contents#

class mani_skill.utils.wrappers.visual_encoders.VisualEncoderWrapper(env, encoder, encoder_config=dict())[source]#

Bases: gymnasium.ObservationWrapper

Modify observations from Env.reset() and Env.step() using observation() function.

If you would like to apply a function to only the observation before passing it to the learning code, you can simply inherit from ObservationWrapper and overwrite the method observation() to implement that transformation. The transformation defined in that method must be reflected by the env observation space. Otherwise, you need to specify the new observation space of the wrapper by setting self.observation_space in the __init__() method of your wrapper.

Parameters:

encoder (Literal['r3m']) –

observation(obs)[source]#

Returns a modified observation.

Parameters:
  • observation – The env observation

  • obs (dict) –

Returns:

The modified observation

base_env: mani_skill.envs.sapien_env.BaseEnv[source]#