(self, num_cycles)
return cycle_offset_pos
Calculates change in the root position after a given number of cycles.

    Args:
      num_cycles: Number of cycles since the start of the motion.

    Returns:
      Net translation of the root position.
Calculates change in the root position after a given number of cycles.
Calculates change in the root position after a given number of cycles .
def _calc_cycle_offset_pos(self, num_cycles):
    """Calculates change in the root position after a given number of cycles.

    Args:
      num_cycles: Number of cycles since the start of the motion.

    Returns:
      Net translation of the root position.
    """

    if not self._enable_cycle_offset_pos:
      cycle_offset_pos = np.zeros(3)
    else:
      if not self._enable_cycle_offset_rot:
        cycle_offset_pos = num_cycles * self._cycle_delta_pos

      else:
        cycle_offset_pos = np.zeros(3)
        for i in range(num_cycles):
          curr_heading = i * self._cycle_delta_heading
          rot = transformations.quaternion_about_axis(curr_heading, [0, 0, 1])
          curr_offset = pose3d.QuaternionRotatePoint(self._cycle_delta_pos, rot)
          cycle_offset_pos += curr_offset

    return cycle_offset_pos
def _calc_cycle_offset_pos ( self , num_cycles ) : if not self . _enable_cycle_offset_pos : cycle_offset_pos = np . zeros ( 3 ) else : if not self . _enable_cycle_offset_rot : cycle_offset_pos = num_cycles * self . _cycle_delta_pos else : cycle_offset_pos = np . zeros ( 3 ) for i in range ( num_cycles ) : curr_heading = i * self . _cycle_delta_heading rot = transformations . quaternion_about_axis ( curr_heading , [ 0 , 0 , 1 ] ) curr_offset = pose3d . QuaternionRotatePoint ( self . _cycle_delta_pos , rot ) cycle_offset_pos += curr_offset return cycle_offset_pos