(self, root_rotation)
return heading
Returns the heading of a rotation q, specified as a quaternion.

    The heading represents the rotational component of q along the vertical
    axis (z axis). The heading is computing with respect to the robot's default
    root orientation (self._default_root_rotation). This is because different
    models have different coordinate systems, and some models may not have the z
    axis as the up direction. This is similar to robot.GetTrueBaseOrientation(),
    but is applied both to the robot and reference motion.

    Args:
      root_rotation: A quaternion representing the rotation of the robot's root.

    Returns:
      An angle representing the rotation about the z axis with respect to
      the default orientation.
Returns the heading of a rotation q, specified as a quaternion.
Returns the heading of a rotation q specified as a quaternion .
def _calc_heading(self, root_rotation):
    """Returns the heading of a rotation q, specified as a quaternion.

    The heading represents the rotational component of q along the vertical
    axis (z axis). The heading is computing with respect to the robot's default
    root orientation (self._default_root_rotation). This is because different
    models have different coordinate systems, and some models may not have the z
    axis as the up direction. This is similar to robot.GetTrueBaseOrientation(),
    but is applied both to the robot and reference motion.

    Args:
      root_rotation: A quaternion representing the rotation of the robot's root.

    Returns:
      An angle representing the rotation about the z axis with respect to
      the default orientation.

    """
    inv_default_rotation = transformations.quaternion_conjugate(
        self._get_default_root_rotation())
    rel_rotation = transformations.quaternion_multiply(root_rotation,
                                                       inv_default_rotation)
    heading = motion_util.calc_heading(rel_rotation)
    return heading
def _calc_heading ( self , root_rotation ) : inv_default_rotation = transformations . quaternion_conjugate ( self . _get_default_root_rotation ( ) ) rel_rotation = transformations . quaternion_multiply ( root_rotation , inv_default_rotation ) heading = motion_util . calc_heading ( rel_rotation ) return heading