Open3d: Segmentation fault when estimate normals

Created on 8 Jan 2020  路  9Comments  路  Source: intel-isl/Open3D

Hi, I'm trying to explore the open3D with my own data, but always got Segmentation fault (core dumped) when using estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=, max_nn= ))

My data is attached. I also tried examples/Python/Basic/pointcloud.py, which does run successfully.

Thanks.

data.zip

Most helpful comment

Ok so apparently Open3D and PCL are incompatible at some level in our setup (maybe both using FLANN leads to a collision..?). We are using some custom pybind11 stuff to interface PCL, and not including that module gets rid of the segfault. Go figure...

All 9 comments

Could you specify radius or max_nn= and run the example again?

Thanks for following up.

I understand the radius value is used to specify the search range to compute normals, so I tried a variety of values from centimeter to meter order (with and without voxel downsample in relative smaller value as well). Also tried different max_nn values which should specify the maximum neighbors for normal estimation. Still get the same error.

Same here. Sadly I cannot share the data :(

gdb trace:

0x00007fffd68999f0 in flann::flann_algorithm_t flann::get_param<flann::flann_algorithm_t>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flann::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, flann::any> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
   from /home/[readacted]/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so

Here's the actual backtrace, not just the SIGSEGV message:

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x00007fffd68999f0 in flann::flann_algorithm_t flann::get_param<flann::flann_algorithm_t>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flann::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, flann::any> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
   from /home/[...]/venv/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so
(gdb) backtrace
#0  0x00007fffd68999f0 in flann::flann_algorithm_t flann::get_param<flann::flann_algorithm_t>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flann::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, flann::any> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
   from /home/[...]/venv/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so



md5-2b5dbce8ac808b7b5faf99d8d7fd0c9b



#1  0x00007fffd689e9f8 in flann::Index<flann::L2<double> >::Index(flann::Matrix<double> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flann::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, flann::any> > > const&, flann::L2<double>) ()
   from /home/[...]/venv/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so



md5-2b5dbce8ac808b7b5faf99d8d7fd0c9b



#2  0x00007fffd6894085 in open3d::geometry::KDTreeFlann::SetRawData(Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1> const, 0, Eigen::Stride<0, 0> > const&) ()
   from /home/[...]/venv/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so



md5-2b5dbce8ac808b7b5faf99d8d7fd0c9b



#3  0x00007fffd689445d in open3d::geometry::KDTreeFlann::SetGeometry(open3d::geometry::Geometry const&) ()
   from /home/[...]/venv/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so



md5-2b5dbce8ac808b7b5faf99d8d7fd0c9b



#4  0x00007fffd6888628 in open3d::geometry::PointCloud::EstimateNormals(open3d::geometry::KDTreeSearchParam const&, bool) ()
   from /home/[...]/venv/lib/python3.6/site-packages/open3d/open3d.cpython-36m-x86_64-linux-gnu.so

And then comes Python stuff.

Ok so apparently Open3D and PCL are incompatible at some level in our setup (maybe both using FLANN leads to a collision..?). We are using some custom pybind11 stuff to interface PCL, and not including that module gets rid of the segfault. Go figure...

I ran into a similar issue with Open3D and PCL as well.

Same issue here. importing both 'open3d' and 'pcl' at the same time occurs the segmentation error.
Removing "import pcl" and leaving only "import open3d" resolved the error as @TobiasFischerP4D mentioned.

Same here

I have the same problem using KDTRee in PCL: pcl::KdTreeFLANN. It leads to segmentation fault with Open3D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edxsx picture edxsx  路  3Comments

blackccpie picture blackccpie  路  3Comments

mutp picture mutp  路  4Comments

lordlycastle picture lordlycastle  路  3Comments

Prakash19921206 picture Prakash19921206  路  4Comments