update 初次融合+调试
This commit is contained in:
@ -58,12 +58,11 @@ def R_matrix(x,y,z,u,v,w):
|
||||
|
||||
return transformation_matrix
|
||||
|
||||
rotation = R_matrix(559.365,0.704,731.196,179.996,66.369,179.996)#张啸给我的值填这里
|
||||
|
||||
# 黄老师给我的xyz和法向量
|
||||
def getPosition(x,y,z,a,b,c):
|
||||
# 图像识别结果:xyz和法向量
|
||||
def getPosition(x,y,z,a,b,c,rotation):
|
||||
target = np.asarray([x, y, z,1])
|
||||
camera2robot = np.loadtxt('D:\BaiduNetdiskDownload\机械臂\GRCNN\\real\cam_pose.txt', delimiter=' ')
|
||||
camera2robot = np.loadtxt('D:\BaiduNetdiskDownload\机械臂\GRCNN\\real\cam_pose.txt', delimiter=' ') #相对目录且分隔符采用os.sep
|
||||
robot2base = rotation
|
||||
camera2base = robot2base @ camera2robot
|
||||
target_position = np.dot(camera2base, target)
|
||||
@ -75,6 +74,3 @@ def getPosition(x,y,z,a,b,c):
|
||||
print(target_position, noraml_base)
|
||||
|
||||
return target_position,noraml_base
|
||||
|
||||
if __name__ =="__main__":
|
||||
getPosition(-96.09919,56.339145,444.640084,-0.09619,-0.45399, 0.88579)
|
||||
Reference in New Issue
Block a user