示例#1
0
 def is_9DOF(self): 
     tra, scale, rot, rot_axis = self.to_translation_scale_rotation()
     if tra is None: 
         return False   
     tra_mat = tr.translation_matrix(tra)
     scale_mat = numpy.diag([scale[0],scale[1],scale[2],1.0])
     rot_mat = tr.rotation_matrix(rot,rot_axis)
     mat = numpy.dot(tra_mat, numpy.dot(scale_mat, rot_mat ) )
     return tr.is_same_transform(mat,self.data)
示例#2
0
文件: Core.py 项目: lynch829/occiput
 def is_9DOF(self): 
     tra, scale, rot, rot_axis = self.to_translation_scale_rotation()
     if tra is None: 
         return False   
     tra_mat = tr.translation_matrix(tra)
     scale_mat = numpy.diag([scale[0],scale[1],scale[2],1.0])
     rot_mat = tr.rotation_matrix(rot,rot_axis)
     mat = numpy.dot(tra_mat, numpy.dot(scale_mat, rot_mat ) )
     return tr.is_same_transform(mat,self.data)
示例#3
0
 def __init__(self, translation, rotation_angle, rotation_direction, rotation_point=None, map_from="",map_to=""): 
     rot = tr.rotation_matrix(rotation_angle, rotation_direction, rotation_point) 
     tra = tr.translation_matrix(translation) 
     mat = numpy.dot(tra,rot)
     Transform_Affine.__init__(self, mat,map_from,map_to) 
示例#4
0
 def __init__(self, angle, direction, point=None, map_from="",map_to=""): 
     mat = tr.rotation_matrix(angle, direction, point)
     Transform_Affine.__init__(self, mat,map_from,map_to)
示例#5
0
 def from_translation_rotation(self, tra, rot, axis=[0,0,1]): 
     return numpy.dot(tr.translation_matrix(tra), tr.rotation_matrix(rot,axis) )
示例#6
0
文件: Core.py 项目: lynch829/occiput
 def __init__(self, translation, rotation_angle, rotation_direction, rotation_point=None, map_from="",map_to=""): 
     rot = tr.rotation_matrix(rotation_angle, rotation_direction, rotation_point) 
     tra = tr.translation_matrix(translation) 
     mat = numpy.dot(tra,rot)
     Transform_Affine.__init__(self, mat,map_from,map_to) 
示例#7
0
文件: Core.py 项目: lynch829/occiput
 def __init__(self, angle, direction, point=None, map_from="",map_to=""): 
     mat = tr.rotation_matrix(angle, direction, point)
     Transform_Affine.__init__(self, mat,map_from,map_to)
示例#8
0
文件: Core.py 项目: lynch829/occiput
 def from_translation_rotation(self, tra, rot, axis=[0,0,1]): 
     return numpy.dot(tr.translation_matrix(tra), tr.rotation_matrix(rot,axis) )