(self, frame0, frame1, blend)
return blend_frame
Linearly interpolate between two frames.

    Args:
      frame0: First frame to be blended corresponds to (blend = 0).
      frame1: Second frame to be blended corresponds to (blend = 1).
      blend: Float between [0, 1], specifying the interpolation between
        the two frames.
    Returns:
      An interpolation of the two frames.
Linearly interpolate between two frames.
Linearly interpolate between two frames .
def blend_frames(self, frame0, frame1, blend):
    """Linearly interpolate between two frames.

    Args:
      frame0: First frame to be blended corresponds to (blend = 0).
      frame1: Second frame to be blended corresponds to (blend = 1).
      blend: Float between [0, 1], specifying the interpolation between
        the two frames.
    Returns:
      An interpolation of the two frames.
    """
    root_pos0 = self.get_frame_root_pos(frame0)
    root_pos1 = self.get_frame_root_pos(frame1)

    root_rot0 = self.get_frame_root_rot(frame0)
    root_rot1 = self.get_frame_root_rot(frame1)

    joints0 = self.get_frame_joints(frame0)
    joints1 = self.get_frame_joints(frame1)

    blend_root_pos = (1.0 - blend) * root_pos0 + blend * root_pos1
    blend_root_rot = transformations.quaternion_slerp(root_rot0, root_rot1,
                                                      blend)
    blend_joints = (1.0 - blend) * joints0 + blend * joints1

    blend_root_rot = motion_util.standardize_quaternion(blend_root_rot)

    blend_frame = np.zeros(self.get_frame_size())
    self.set_frame_root_pos(blend_root_pos, blend_frame)
    self.set_frame_root_rot(blend_root_rot, blend_frame)
    self.set_frame_joints(blend_joints, blend_frame)
    return blend_frame
def blend_frames ( self , frame0 , frame1 , blend ) : root_pos0 = self . get_frame_root_pos ( frame0 ) root_pos1 = self . get_frame_root_pos ( frame1 ) root_rot0 = self . get_frame_root_rot ( frame0 ) root_rot1 = self . get_frame_root_rot ( frame1 ) joints0 = self . get_frame_joints ( frame0 ) joints1 = self . get_frame_joints ( frame1 ) blend_root_pos = ( 1.0 - blend ) * root_pos0 + blend * root_pos1 blend_root_rot = transformations . quaternion_slerp ( root_rot0 , root_rot1 , blend ) blend_joints = ( 1.0 - blend ) * joints0 + blend * joints1 blend_root_rot = motion_util . standardize_quaternion ( blend_root_rot ) blend_frame = np . zeros ( self . get_frame_size ( ) ) self . set_frame_root_pos ( blend_root_pos , blend_frame ) self . set_frame_root_rot ( blend_root_rot , blend_frame ) self . set_frame_joints ( blend_joints , blend_frame ) return blend_frame