File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1934,6 +1934,27 @@ def Rt(
19341934 t = np .zeros ((3 ,))
19351935 return cls (smb .rt2tr (R , t , check = check ), check = check )
19361936
1937+ @classmethod
1938+ def CopyFrom (
1939+ cls ,
1940+ T : SE3Array ,
1941+ check : bool = True
1942+ ) -> SE3 :
1943+ """
1944+ Create an SE(3) from a 4x4 numpy array that is passed by value.
1945+
1946+ :param T: homogeneous transformation
1947+ :type T: ndarray(4, 4)
1948+ :param check: check rotation validity, defaults to True
1949+ :type check: bool, optional
1950+ :raises ValueError: bad rotation matrix, bad transformation matrix
1951+ :return: SE(3) matrix representing that transformation
1952+ :rtype: SE3 instance
1953+ """
1954+ if T is None :
1955+ raise ValueError ("Transformation matrix must not be None" )
1956+ return cls (np .copy (T ), check = check )
1957+
19371958 def angdist (self , other : SE3 , metric : int = 6 ) -> float :
19381959 r"""
19391960 Angular distance metric between poses
You can’t perform that action at this time.
0 commit comments