Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1.  
  2. #[ 0.24136077  0.07089735 -0.0252355   0.05194225 -1.57151119  3.17973722]
  3. def buildCalibPose(x):
  4.     Rx = np.matrix(np.array([
  5.         [1, 0, 0],
  6.         [0, cos(x[3]), -sin(x[3])],
  7.         [0, sin(x[3]), cos(x[3])]                
  8.     ]))
  9.     Ry = np.matrix(np.array([    
  10.         [cos(x[4]), 0, sin(x[4])],
  11.         [0, 1, 0],
  12.         [-sin(x[4]), 0, cos(x[4])]
  13.     ]))
  14.     Rz = np.matrix(np.array([
  15.         [cos(x[5]), -sin(x[5]), 0],
  16.         [sin(x[5]), cos(x[5]), 0],
  17.         [0, 0, 1]
  18.     ]))
  19.     tempM = np.matmul(Rz, Ry)
  20.     M = np.matmul(tempM, Rx)
  21.     tempM = np.matrix(M)
  22.     tempxyzCam = np.matrix(xyzCam)
  23.     R = np.matmul(tempM, tempxyzCam)
  24.     R[0] = R[0] + x[0]
  25.     R[1] = R[1] + x[1]
  26.     R[2] = R[2] + x[2]
  27.     return R
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement