update 流程调试
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import os
|
||||
|
||||
import numpy as np
|
||||
from scipy.spatial.transform import Rotation as R
|
||||
|
||||
@ -62,7 +64,7 @@ def R_matrix(x,y,z,u,v,w):
|
||||
# 图像识别结果: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=' ') #相对目录且分隔符采用os.sep
|
||||
camera2robot = np.loadtxt('./cam_pose.txt', delimiter='') #相对目录且分隔符采用os.sep
|
||||
robot2base = rotation
|
||||
camera2base = robot2base @ camera2robot
|
||||
target_position = np.dot(camera2base, target)
|
||||
|
||||
Reference in New Issue
Block a user