(self, unused_physics: 'mjcf.Physics')
return np.concatenate([o.flatten() for o in obs])
Body quat of the reference relative to the reference root quat.
Body quat of the reference relative to the reference root quat.
Body quat of the reference relative to the reference root quat .
def get_reference_ego_bodies_quats(self, unused_physics: 'mjcf.Physics'):
    """Body quat of the reference relative to the reference root quat."""
    time_steps = self._time_step + self._ref_steps
    obs = []
    quats_for_clip = self._reference_ego_bodies_quats[self._current_clip_index]
    for t in time_steps:
      if t not in quats_for_clip:
        root_quat = self._clip_reference_features['quaternion'][t, :]
        quats_for_clip[t] = [
            tr.quat_diff(  # pylint: disable=g-complex-comprehension
                root_quat,
                self._clip_reference_features['body_quaternions'][t, b, :])
            for b in self._body_idxs
        ]
      obs.extend(quats_for_clip[t])
    return np.concatenate([o.flatten() for o in obs])
def get_reference_ego_bodies_quats ( self , unused_physics : 'mjcf.Physics' ) : time_steps = self . _time_step + self . _ref_steps obs = [ ] quats_for_clip = self . _reference_ego_bodies_quats [ self . _current_clip_index ] for t in time_steps : if t not in quats_for_clip : root_quat = self . _clip_reference_features [ 'quaternion' ] [ t , : ] quats_for_clip [ t ] = [ tr . quat_diff ( # pylint: disable=g-complex-comprehension root_quat , self . _clip_reference_features [ 'body_quaternions' ] [ t , b , : ] ) for b in self . _body_idxs ] obs . extend ( quats_for_clip [ t ] ) return np . concatenate ( [ o . flatten ( ) for o in obs ] )