(self, physics: 'mjcf.Physics', random_state)
Update the data after step.
Update the data after step.
Update the data after step .
def after_step(self, physics: 'mjcf.Physics', random_state):
    """Update the data after step."""
    super().after_step(physics, random_state)
    self._time_step += 1

    # Update the walker's data for this timestep.
    self._walker_features = utils.get_features(
        physics, self._walker, props=self._props)
    # features for default error
    self._walker_joints = np.array(physics.bind(self._walker.mocap_joints).qpos)  # pytype: disable=attribute-error

    self._current_reference_features = {
        k: v[self._time_step].copy()
        for k, v in self._clip_reference_features.items()
    }

    # Error.
    self._compute_termination_error()

    # Terminate based on the error.
    self._end_mocap = self._time_step == self._last_step

    self._reference_observations.update(
        self.get_all_reference_observations(physics))

    self._update_ghost(physics)
def after_step ( self , physics : 'mjcf.Physics' , random_state ) : super ( ) . after_step ( physics , random_state ) self . _time_step += 1 # Update the walker's data for this timestep. self . _walker_features = utils . get_features ( physics , self . _walker , props = self . _props ) # features for default error self . _walker_joints = np . array ( physics . bind ( self . _walker . mocap_joints ) . qpos ) # pytype: disable=attribute-error self . _current_reference_features = { k : v [ self . _time_step ] . copy ( ) for k , v in self . _clip_reference_features . items ( ) } # Error. self . _compute_termination_error ( ) # Terminate based on the error. self . _end_mocap = self . _time_step == self . _last_step self . _reference_observations . update ( self . get_all_reference_observations ( physics ) ) self . _update_ghost ( physics )