def to_pose(self):
    """ Returns a [7x1] pose vector.

    In the form: pose = [x, y, z, qx, qy, qz, qw].T.
    """
    self.normalize()

    pose = np.zeros(7)
    q_rot = self.q_rot
    if (q_rot.w < 0.):
      q_rot = -q_rot
    translation = (2.0 * self.q_dual) * self.q_rot.conjugate()

    pose[0:3] = translation.q[0:3].copy()
    pose[3:7] = q_rot.q.copy()
    return pose.copy()
 Returns a [7x1] pose vector.

    In the form: pose = [x, y, z, qx, qy, qz, qw].T.
    
hand_eye_calibration/python/hand_eye_calibration/dual_quaternion.py