(self, time)
return vel
Calculates the reference velocity for a given point in time.

    Args:
      time: Time elapsed since the start of the reference motion.

    Returns:
      An array containing the reference velocity at the given point in time.
Calculates the reference velocity for a given point in time.
Calculates the reference velocity for a given point in time .
def _calc_ref_vel(self, time):
    """Calculates the reference velocity for a given point in time.

    Args:
      time: Time elapsed since the start of the reference motion.

    Returns:
      An array containing the reference velocity 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:
      vel = self._calc_ref_vel_warmup()
    else:
      vel = motion.calc_frame_vel(time)

    root_vel = motion.get_frame_root_vel(vel)
    root_ang_vel = motion.get_frame_root_ang_vel(vel)

    root_vel = pose3d.QuaternionRotatePoint(root_vel, self._origin_offset_rot)
    root_ang_vel = pose3d.QuaternionRotatePoint(root_ang_vel,
                                                self._origin_offset_rot)

    motion.set_frame_root_vel(root_vel, vel)
    motion.set_frame_root_ang_vel(root_ang_vel, vel)

    return vel
def _calc_ref_vel ( self , 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 : vel = self . _calc_ref_vel_warmup ( ) else : vel = motion . calc_frame_vel ( time ) root_vel = motion . get_frame_root_vel ( vel ) root_ang_vel = motion . get_frame_root_ang_vel ( vel ) root_vel = pose3d . QuaternionRotatePoint ( root_vel , self . _origin_offset_rot ) root_ang_vel = pose3d . QuaternionRotatePoint ( root_ang_vel , self . _origin_offset_rot ) motion . set_frame_root_vel ( root_vel , vel ) motion . set_frame_root_ang_vel ( root_ang_vel , vel ) return vel