stray_visualize_11.py 804 B

12345678910111213141516171819202122232425262728
  1. def main():
  2. flags = read_args()
  3. if not validate(flags):
  4. return
  5. if not flags.frames and not flags.point_clouds and not flags.integrate:
  6. flags.frames = True
  7. flags.point_clouds = True
  8. flags.trajectory = True
  9. data = read_data(flags)
  10. geometries = []
  11. if flags.trajectory:
  12. geometries += trajectory(flags, data)
  13. if flags.frames:
  14. geometries += show_frames(flags, data)
  15. if flags.point_clouds:
  16. geometries += point_clouds(flags, data)
  17. if flags.integrate:
  18. mesh = integrate(flags, data)
  19. if flags.mesh_filename is not None:
  20. o3d.io.write_triangle_mesh(flags.mesh_filename, mesh)
  21. geometries += [mesh]
  22. o3d.visualization.draw_geometries(geometries)
  23. if __name__ == "__main__":
  24. main()