Commit 7dff5785 authored by oscar's avatar oscar

提交更新

parent 4d534793
...@@ -21,7 +21,7 @@ if __name__ == '__main__': ...@@ -21,7 +21,7 @@ if __name__ == '__main__':
str1 = str.split('/')[-1] str1 = str.split('/')[-1]
print(str1[0:str1.find('.pcd')]) print(str1[0:str1.find('.pcd')])
file_path = "D:/pointcloud1.pcd" file_path = "/home/oscar/ros/git/jfxmap_python/pointcloud1.pcd"
pcd = o3d.io.read_point_cloud(file_path) pcd = o3d.io.read_point_cloud(file_path)
print(pcd) print(pcd)
print(pcd.dimension()) print(pcd.dimension())
......
...@@ -501,6 +501,7 @@ if __name__ == '__main__': ...@@ -501,6 +501,7 @@ if __name__ == '__main__':
xyz = np.array(pcd.points) xyz = np.array(pcd.points)
savecloud = o3d.geometry.PointCloud() savecloud = o3d.geometry.PointCloud()
savecloud += g_pcd
drawpointcloud = [] drawpointcloud = []
merge_geos = [pcd] merge_geos = [pcd]
exportDrawCloud = [g_pcd] exportDrawCloud = [g_pcd]
...@@ -553,7 +554,7 @@ if __name__ == '__main__': ...@@ -553,7 +554,7 @@ if __name__ == '__main__':
merge_geos += [heading_pcd] merge_geos += [heading_pcd]
drawpointcloud += [heading_pcd] drawpointcloud += [heading_pcd]
exportDrawCloud += [heading_pcd] exportDrawCloud += [heading_pcd]
savecloud += heading_pcd # savecloud += heading_pcd
f1.close() f1.close()
if vis: if vis:
...@@ -562,8 +563,8 @@ if __name__ == '__main__': ...@@ -562,8 +563,8 @@ if __name__ == '__main__':
drawpointcloud += [axis_pcd] drawpointcloud += [axis_pcd]
exportDrawCloud += [axis_pcd] exportDrawCloud += [axis_pcd]
#pcd.paint_uniform_color([1.00, 0, 0]) #pcd.paint_uniform_color([1.00, 0, 0])
# savefile = "D:/pointcloud" + str(num) + ".pcd" savefile = "/home/oscar/ros/git/jfxmap_python/pointcloud" + str(num) + ".pcd"
# o3d.io.write_point_cloud(savefile,savecloud) o3d.io.write_point_cloud(savefile,savecloud)
num += 1 num += 1
# custom_draw_geometry_with_key_callback(merge_geos, file_path) # custom_draw_geometry_with_key_callback(merge_geos, file_path)
# custom_draw_geometry_with_key_callback(drawpointcloud, file_path) # custom_draw_geometry_with_key_callback(drawpointcloud, file_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment