(self)
return not self._error_logger.errors_found
Starts a new simulation episode.

    Starting a new episode may be associated with changing the physics instance.
    The method tracks that and notifies observers through 'on_physics_changed'
    subject.

    Returns:
      True if the operation was successful, False otherwise.
Starts a new simulation episode.
Starts a new simulation episode .
def _start(self):
    """Starts a new simulation episode.

    Starting a new episode may be associated with changing the physics instance.
    The method tracks that and notifies observers through 'on_physics_changed'
    subject.

    Returns:
      True if the operation was successful, False otherwise.
    """
    # NB: we check the identity of the data pointer rather than the physics
    # instance itself, since this allows us to detect when the physics has been
    # "reloaded" using one of the `reload_from_*` methods.
    old_data_ptr = self._env.physics.data.ptr

    with self._error_logger:
      self._time_step = self._env.reset()

    if self._env.physics.data.ptr is not old_data_ptr:
      for listener in self.on_physics_changed:
        listener()
    return not self._error_logger.errors_found
def _start ( self ) : # NB: we check the identity of the data pointer rather than the physics # instance itself, since this allows us to detect when the physics has been # "reloaded" using one of the `reload_from_*` methods. old_data_ptr = self . _env . physics . data . ptr with self . _error_logger : self . _time_step = self . _env . reset ( ) if self . _env . physics . data . ptr is not old_data_ptr : for listener in self . on_physics_changed : listener ( ) return not self . _error_logger . errors_found