def __init__(self, rotation=np.eye(3), translation=np.zeros(3),
                 from_frame='unassigned', to_frame='world'):
        """Initialize a RigidTransform.

        Parameters
        ----------
        rotation : :obj:`numpy.ndarray` of float
            A 3x3 rotation matrix (should be unitary).

        translation : :obj:`numpy.ndarray` of float
            A 3-entry translation vector.

        from_frame : :obj:`str`
            A name for the frame of reference on which this transform
            operates. This and to_frame are used for checking compositions
            of RigidTransforms, which is useful for debugging and catching
            errors.

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

        Raises
        ------
        ValueError
            If any of the arguments are invalid. The frames must be strings or
            unicode, the translations and rotations must be ndarrays, have the
            correct shape, and the determinant of the rotation matrix should be
            1.0.
        """
        if not isinstance(from_frame, str) and not isinstance(from_frame, unicode):
            raise ValueError('Must provide string name of input frame of data')
        if not isinstance(to_frame, str) and not isinstance(to_frame, unicode):
            raise ValueError('Must provide string name of output frame of data')

        self.rotation = rotation
        self.translation = translation
        self._from_frame = str(from_frame)
        self._to_frame = str(to_frame)
def __init__ ( self , rotation = np . eye ( 3 ) , translation = np . zeros ( 3 ) , from_frame = 'unassigned' , to_frame = 'world' ) : if not isinstance ( from_frame , str ) and not isinstance ( from_frame , unicode ) : raise ValueError ( 'Must provide string name of input frame of data' ) if not isinstance ( to_frame , str ) and not isinstance ( to_frame , unicode ) : raise ValueError ( 'Must provide string name of output frame of data' ) self . rotation = rotation self . translation = translation self . _from_frame = str ( from_frame ) self . _to_frame = str ( to_frame )
Initialize a RigidTransform.

        Parameters
        ----------
        rotation : :obj:`numpy.ndarray` of float
            A 3x3 rotation matrix (should be unitary).

        translation : :obj:`numpy.ndarray` of float
            A 3-entry translation vector.

        from_frame : :obj:`str`
            A name for the frame of reference on which this transform
            operates. This and to_frame are used for checking compositions
            of RigidTransforms, which is useful for debugging and catching
            errors.

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

        Raises
        ------
        ValueError
            If any of the arguments are invalid. The frames must be strings or
            unicode, the translations and rotations must be ndarrays, have the
            correct shape, and the determinant of the rotation matrix should be
            1.0.