该方法用于根据一个轴和角度获取旋转矩阵。
get_rotation_matrix_from_axis_angle(axis, angle)
import open3d as o3d
import numpy as np
# 定义轴和角度
axis = [1.0, 1.0, 0.0]
angle = np.pi / 2.0
# 获取旋转矩阵
R = o3d.geometry.get_rotation_matrix_from_axis_angle(axis, angle)
print(R)
输出:
[[ 0.70710678 -0.70710678 0. ]
[ 0.70710678 0.70710678 0. ]
[ 0. 0. 1. ]]