(self)
See base class.
See base class.
See base class .
def _get_observation(self) -> _ARRAY:
    """See base class."""
    dx, dy, dz = self._current_base_position - self._last_base_position
    if self._convert_to_local_frame:
      dx_local = np.cos(self._last_yaw) * dx + np.sin(self._last_yaw) * dy
      dy_local = -np.sin(self._last_yaw) * dx + np.cos(self._last_yaw) * dy
      return np.array([dx_local, dy_local, dz])
    else:
      return np.array([dx, dy, dz])
def _get_observation ( self ) -> _ARRAY : dx , dy , dz = self . _current_base_position - self . _last_base_position if self . _convert_to_local_frame : dx_local = np . cos ( self . _last_yaw ) * dx + np . sin ( self . _last_yaw ) * dy dy_local = - np . sin ( self . _last_yaw ) * dx + np . cos ( self . _last_yaw ) * dy return np . array ( [ dx_local , dy_local , dz ] ) else : return np . array ( [ dx , dy , dz ] )