(self, current_time)
return out
Reads the content of the buffer at the given timestamp.
Reads the content of the buffer at the given timestamp.
Reads the content of the buffer at the given timestamp .
def read(self, current_time):
    """Reads the content of the buffer at the given timestamp."""
    self._update_arrived_deque(current_time)
    if self._has_buffer_dim:
      out = np.empty(self._buffered_shape, dtype=self._dtype)
      for i, obs in enumerate(self._arrived_deque):
        out[i] = obs.value
    else:
      out = self._arrived_deque[0].value.copy()
    return out
def read ( self , current_time ) : self . _update_arrived_deque ( current_time ) if self . _has_buffer_dim : out = np . empty ( self . _buffered_shape , dtype = self . _dtype ) for i , obs in enumerate ( self . _arrived_deque ) : out [ i ] = obs . value else : out = self . _arrived_deque [ 0 ] . value . copy ( ) return out