Open Buglakova opened 1 year ago
First of all, there is a new nns engine for t point clouds (https://github.com/isl-org/Open3D/blob/master/cpp/open3d/core/nns/KnnIndex.h), but the python binding is not there AFAIK. I will assign myself to follow up this item.
Regarding the legacy search engine you are using, it lacks proper boundary condition check and may be related to #6235, I will have to follow up as well.
For the workaround itself, using o3d.geometry.KDTreeFlann(pcd1.point.positions.numpy().T)
will fix the problem. It sounds weird but there is a transpose between the raw input (e.g. numpy) and the geometry (e.g. point cloud).
That's right, I missed the .T
bit, thank you!
Looking forward to see the new engine available for Python users too
Hi @theNded @Buglakova , I think the pybind for new nns
engine is already supported (see o3d.core.nns
). But the related documentation is missing.
If true, please leave docs tag here. I wont be able to work asap, but I am keeping track of all issues labelled docs.
Checklist
master
branch).My Question
Hello,
I register two point clouds and then I'd like to find several nearest neighbors in the moving point cloud for each point in the fixed point cloud. I handle point clouds using
o3d.t.geometry.PointCloud
, especially because I have additional custom attributes of the points that I need to read and write. I try to useo3d.geometry.KDTreeFlann
like this:which gives
RuntimeError: search_hybrid_vector_3d() error!
I assume that the data type of the point is wrong (it'sfloat64
numpy array) but not sure how to fix it. Is there a way to do the same without going back to the legacy geometry classes?