mani_skill.utils.wrappers.frame_stack ===================================== .. py:module:: mani_skill.utils.wrappers.frame_stack .. autoapi-nested-parse:: Wrapper that stacks frames. Adapted from gymnasium package to support GPU vectorizated environments. Classes ------- .. autoapisummary:: mani_skill.utils.wrappers.frame_stack.FrameStack Module Contents --------------- .. py:class:: FrameStack(env, num_stack, lz4_compress = False) Bases: :py:obj:`gymnasium.ObservationWrapper` Observation wrapper that stacks the observations in a rolling manner. For example, if the number of stacks is 4, then the returned observation contains the most recent 4 observations. For environment 'PickCube-v1', the original observation is an array with shape [42], so if we stack 4 observations, the processed observation has shape [4, 42]. This wrapper also supports dict observations, and will stack the leafs of the dictionary accordingly. .. note:: - After :meth:`reset` is called, the frame buffer will be filled with the initial observation. I.e. the observation returned by :meth:`reset` will consist of `num_stack` many identical frames. .. py:method:: observation(observation) Returns a modified observation. :param observation: The :attr:`env` observation :returns: The modified observation .. py:method:: reset(seed=None, options=None) Reset the environment with kwargs. :param seed: The seed for the environment reset :param options: The options for the environment reset :returns: The stacked observations .. py:method:: step(action) Steps through the environment, appending the observation to the frame buffer. :param action: The action to step through the environment with :returns: Stacked observations, reward, terminated, truncated, and information from the environment .. py:property:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:attribute:: frames .. py:attribute:: lz4_compress :value: False .. py:attribute:: num_stack .. py:attribute:: use_dict