extrinsic[:3, :3] = o3d.geometry.get_rotation_matrix_from_xyz(direction, up_vector) TypeError: get_rotation_matrix_from_xyz(): incompatible function arguments. The following argument types are supported: 1. (rotation: numpy.ndarray[float64[3, 1]]) -> numpy.ndarray[float64[3, 3]] Invoked with: array([-0.75525011, -0.6553962 , 0.00728592]), array([-0.6554136 , 0.75527016, 0. ])
时间: 2024-01-17 19:04:43 浏览: 273
matlab_toolbox_calib.rar_The Grid_calib_matlab_toolbox_calib_长度标
根据您提供的信息,这个错误是因为您传递给函数get_rotation_matrix_from_xyz的参数类型不符合函数的要求。根据错误信息,该函数支持的参数类型为(rotation: numpy.ndarray[float64[3, 1]]) -> numpy.ndarray[float64[3, 3]]。
您传递的参数为array([-0.75525011, -0.6553962 , 0.00728592])和array([-0.6554136 , 0.75527016, 0. ]),这两个参数的类型不符合函数的要求。您需要将这两个参数转换为符合函数要求的类型,即numpy.ndarray[float64[3, 1]]。您可以使用numpy.reshape()函数将这两个参数转换为正确的类型,例如:
rotation = np.array([-0.75525011, -0.6553962 , 0.00728592]).reshape(3,1)
up_vector = np.array([-0.6554136 , 0.75527016, 0. ]).reshape(3,1)
extrinsic[:3, :3] = o3d.geometry.get_rotation_matrix_from_xyz(rotation, up_vector)
阅读全文