def exp(x): if isinstance(x,se3.Motion): return se3.exp6FromMotion(x) elif np.isscalar(x): return math.exp(x) elif isinstance(x,np.matrix): if len(x)==6: return se3.exp6FromVector(x) elif len(x)==3: return se3.exp3(x) else: print 'Error only 3 and 6 vectors are allowed.' else: print 'Error exp is only defined for real, vector3, vector6 and se3.Motion objects.'
def exp(x): if isinstance(x, se3.Motion): return se3.exp6FromMotion(x) if np.isscalar(x): return math.exp(x) if isinstance(x, np.ndarray): if x.shape == (6, 1): return se3.exp6FromVector(x) if x.shape == (3, 1): return se3.exp3(x) raise ValueError('Error only 3 and 6 vectors are allowed.') raise ValueError('Error exp is only defined for real, vector3, vector6 and se3.Motion objects.')
def exp(x): if isinstance(x, se3.Motion): return se3.exp6FromMotion(x) if np.isscalar(x): return math.exp(x) if isinstance(x, np.ndarray): if x.shape == (6, 1): return se3.exp6FromVector(x) if x.shape == (3, 1): return se3.exp3(x) raise ValueError('Error only 3 and 6 vectors are allowed.') raise ValueError( 'Error exp is only defined for real, vector3, vector6 and se3.Motion objects.' )