humanpose1 / python_shot

binding of pcl for python shot descriptor
MIT License
4 stars 0 forks source link

problems with open3d #1

Open fabiopoiesi opened 2 years ago

fabiopoiesi commented 2 years ago

Hi,

Thanks for sharing this useful project. I have issues in importing open3d in your project. If I do the following, I get segmentation fault.

import pytest
import numpy as np
import open3d
import handcrafted_descriptor as hd

pcd = np.random.randn(50000, 3).astype(float)
normals = np.random.randn(50000, 3).astype(float)
normals = normals / np.linalg.norm(normals, axis=1).reshape(50000, 1)
descr = hd.compute_shot(pcd, normals, pcd[::300], normals[::300], 1)

Do you have the same?

humanpose1 commented 2 years ago

Hi, Thank you for your interest in this project. I have the same problem. Unfortunately, I do not know why a segfault happens. It is not a completely satisfying solution but you can import handcrafted_descriptor and then, import open3d, like this

import pytest
import numpy as np
import handcrafted_descriptor as hd
import open3d

pcd = np.random.randn(50000, 3).astype(float)
normals = np.random.randn(50000, 3).astype(float)
normals = normals / np.linalg.norm(normals, axis=1).reshape(50000, 1)
descr = hd.compute_shot(pcd, normals, pcd[::300], normals[::300], 1)

In my case, there is no more segfault with this code.

Best,