(self, time, apply_origin_offset=True)
return pose
Calculates the reference pose for a given point in time.

    Args:
      time: Time elapsed since the start of the reference motion.
      apply_origin_offset: A flag for enabling the origin offset to be applied
        to the pose.

    Returns:
      An array containing the reference pose at the given point in time.
Calculates the reference pose for a given point in time.
Calculates the reference pose for a given point in time .
def _calc_ref_pose(self, time, apply_origin_offset=True):
    """Calculates the reference pose for a given point in time.

    Args:
      time: Time elapsed since the start of the reference motion.
      apply_origin_offset: A flag for enabling the origin offset to be applied
        to the pose.

    Returns:
      An array containing the reference pose at the given point in time.
    """

    motion = self.get_active_motion()
    enable_warmup_pose = self._curr_episode_warmup \
                         and time >= -self._warmup_time and time < 0.0
    if enable_warmup_pose:
      pose = self._calc_ref_pose_warmup()
    else:
      pose = motion.calc_frame(time)

    if apply_origin_offset:
      root_pos = motion.get_frame_root_pos(pose)
      root_rot = motion.get_frame_root_rot(pose)

      root_rot = transformations.quaternion_multiply(self._origin_offset_rot,
                                                     root_rot)
      root_pos = pose3d.QuaternionRotatePoint(root_pos, self._origin_offset_rot)
      root_pos += self._origin_offset_pos

      motion.set_frame_root_rot(root_rot, pose)
      motion.set_frame_root_pos(root_pos, pose)

    return pose
def _calc_ref_pose ( self , time , apply_origin_offset = True ) : motion = self . get_active_motion ( ) enable_warmup_pose = self . _curr_episode_warmup and time >= - self . _warmup_time and time < 0.0 if enable_warmup_pose : pose = self . _calc_ref_pose_warmup ( ) else : pose = motion . calc_frame ( time ) if apply_origin_offset : root_pos = motion . get_frame_root_pos ( pose ) root_rot = motion . get_frame_root_rot ( pose ) root_rot = transformations . quaternion_multiply ( self . _origin_offset_rot , root_rot ) root_pos = pose3d . QuaternionRotatePoint ( root_pos , self . _origin_offset_rot ) root_pos += self . _origin_offset_pos motion . set_frame_root_rot ( root_rot , pose ) motion . set_frame_root_pos ( root_pos , pose ) return pose