(self, env)
A callback for the reset event that initializes the history buffer.

    Args:
      env: the environment who invokes this callback function (unused)
A callback for the reset event that initializes the history buffer.
A callback for the reset event that initializes the history buffer .
def on_reset(self, env) -> None:
    """A callback for the reset event that initializes the history buffer.

    Args:
      env: the environment who invokes this callback function (unused)
    """
    super(HistoricSensorWrapper, self).on_reset(env)

    self._history_buffer = collections.deque(maxlen=self._num_history)
    for _ in range(self._num_history):
      self._history_buffer.appendleft(self._wrapped_sensor.get_observation())
def on_reset ( self , env ) -> None : super ( HistoricSensorWrapper , self ) . on_reset ( env ) self . _history_buffer = collections . deque ( maxlen = self . _num_history ) for _ in range ( self . _num_history ) : self . _history_buffer . appendleft ( self . _wrapped_sensor . get_observation ( ) )