def transform_from_dual_quaternion(dq, from_frame='unassigned', to_frame='world'):
        """Create a RigidTransform from a DualQuaternion.

        Parameters
        ----------
        dq : :obj:`DualQuaternion`
            The DualQuaternion to transform.

        from_frame : :obj:`str`
            A name for the frame of reference on which this transform
            operates.

        to_frame : :obj:`str`
            A name for the frame of reference to which this transform
            moves objects.

        Returns
        -------
        :obj:`RigidTransform`
            The RigidTransform made from the DualQuaternion.
        """
        quaternion = dq.qr
        translation = 2 * dq.qd[1:]
        return RigidTransform(rotation=quaternion, translation=translation, from_frame=from_frame, to_frame=to_frame)
Create a RigidTransform from a DualQuaternion.

        Parameters
        ----------
        dq : :obj:`DualQuaternion`
            The DualQuaternion to transform.

        from_frame : :obj:`str`
            A name for the frame of reference on which this transform
            operates.

        to_frame : :obj:`str`
            A name for the frame of reference to which this transform
            moves objects.

        Returns
        -------
        :obj:`RigidTransform`
            The RigidTransform made from the DualQuaternion.