Open hbanzhaf opened 2 years ago
It seems to run for me with the following change:
import os
import open3d as o3d
from tqdm import tqdm
from tqdm.contrib.concurrent import process_map
import multiprocessing
try:
multiprocessing.set_start_method('forkserver')
except RuntimeError: # context has already been set
pass
def create_scene(path_to_mesh: str) -> None:
mesh = o3d.io.read_triangle_mesh(path_to_mesh)
mesh_t = o3d.t.geometry.TriangleMesh.from_legacy(mesh)
scene = o3d.t.geometry.RaycastingScene()
scene.add_triangles(mesh_t)
if __name__ == '__main__':
path_to_mesh = o3d.data.BunnyMesh().path
args = [path_to_mesh for _ in range(2)]
process_map(create_scene, args, max_workers=2, desc='Creating scenes')
Checklist
master
branch).Describe the issue
I am running Open3D 0.15.2 in a fresh Python 3.8 conda environment. My goal is to do some computations in parallel using
o3d.t.geometry.RaycastingScene()
. Unfortunately, my code gets stuck when I runo3d.t.geometry.TriangleMesh.from_legacy(mesh)
. Please find an example below. Converting the mesh to ao3d.t.geometry.TriangleMesh
in the main-function and passing it to the parallelized function is not an option for me. I am happy to hear about your insights.Steps to reproduce the bug
Open3D, Python and System information