1、open3d bug:pcd转txt前后位姿发生改变
open3d会对原有结果进行一个微小位姿变换
python
import open3d as o3d
import numpy as np
# 读取PCD点云文件
pcd = o3d.io.read_point_cloud('/newdisk/darren_pty/zoom_centered_s2.pcd')
# 获取点云坐标
points = pcd.points
# 指定保存文件路径
save_path = '/newdisk/darren_pty/point_cloud.txt'
# 将点云坐标保存为文本文件
np.savetxt(save_path, np.asarray(points), fmt='%.6f') # fmt 参数指定保存的浮点数格式
print(f'Point cloud saved to: {save_path}')
结果: