Point Histogram Descriptors: Segmentation fault (core dumped)

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Point Histogram Descriptors: Segmentation fault (core dumped)

petaq
Hello,

I am running Ubuntu  16.04, PCL 1.8. I am trying to run some point features example code, but I get a segmentation fault (core dumped) when I try to run pfh.compute() or fpfh.compute(). I have tried to provide information I think is relevant but if  there is anything I forgot then please let me know and I will provide it!

My code is as follows (basically copy-pasted from http://pointclouds.org/documentation/tutorials/fpfh_estimation.php)

#include <pcl/point_types.h>
#include <pcl/features/fpfh.h>
#include <pcl/io/io.h>
#include <pcl/kdtree/kdtree.h>
#include <pcl/search/kdtree.h>
#include <pcl/io/pcd_io.h>

int  main ()

{

 pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
 pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal> ());
 

  // load point cloud -- I was having issues with the next line when I tried to load it as PointNormal?
  pcl::io::loadPCDFile ("testnew.pcd", *cloud);
  pcl::io::loadPCDFile ("testnew.pcd", *normals);


  pcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33> fpfh;

  fpfh.setInputCloud (cloud);
  fpfh.setInputNormals (normals);

  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ());
  fpfh.setSearchMethod (tree);
  
  pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhs (new pcl::PointCloud<pcl::FPFHSignature33> ());
  fpfh.setRadiusSearch (0.05);


  fpfh.compute (*fpfhs); 

}
The data seems to be loaded into PCL. I've also removed rows with NaN values and have also downsampled to make the file smaller (all in another pcl program, which runs fine), so those shouldn't be an issue. I am not very experienced in debugging but running gdb gave:


(gdb) run
Starting program: /home/amdanko/PCL_PLAYGROUND/testpf/build/pfh1 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >, Eigen::internal::assign_op<float>, 0>, 3, 0>::run (
    kernel=<synthetic pointer>) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:386
386	      kernel.template assignPacket<dstAlignment, srcAlignment, PacketType>(index);
(gdb) backtrace
#0  Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >, Eigen::internal::assign_op<float>, 0>, 3, 0>::run (
    kernel=<synthetic pointer>) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:386
#1  Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float> > (func=..., 
    src=..., dst=...) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:653
#2  Eigen::internal::Assignment<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float>, Eigen::internal::Dense2Dense, float>::run (func=..., src=..., dst=...) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:790
#3  Eigen::internal::call_assignment_no_alias<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float> > (func=..., 
    src=..., dst=...) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:747
#4  Eigen::internal::call_assignment<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, -1, 0, -1, -1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::internal::assign_op<float> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator_traits<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >::Shape>::value, void*>::type) (func=..., src=..., dst=...) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:712
#5  Eigen::internal::call_assignment<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > > (src=..., dst=...)
    at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:693
#6  Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::_set<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > > (other=..., this=0x7fffffffdda8)
    at /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:682
#7  Eigen::Matrix<float, -1, -1, 0, -1, -1>::operator=<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > > (other=..., this=<optimized out>)
    at /usr/include/eigen3/Eigen/src/Core/Matrix.h:225
#8  Eigen::DenseBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::setConstant (val=<optimized out>, this=0x7fffffffdda8)
    at /usr/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h:338
#9  Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::setZero (this=this@entry=0x7fffffffdda8, 
    rows=rows@entry=9389, cols=11) at /usr/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h:541
#10 0x00007ffff5de2071 in pcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33>::computeSPFHSignatures (
    this=this@entry=0x7fffffffdce0, spfh_hist_lookup=std::vector of length 9389, capacity 9389 = {...}, hist_f1=..., 
    hist_f2=..., hist_f3=...) at /home/amdanko/pcl/features/include/pcl/features/impl/fpfh.hpp:208
#11 0x00007ffff5e001c4 in pcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33>::computeFeature (
---Type <return> to continue, or q <return> to quit---
    ffffdce0, output=...) at /home/amdanko/pcl/features/include/pcl/features/impl/fpfh.hpp:242
#12 0x000000000043a44f in pcl::Feature<pcl::PointXYZ, pcl::FPFHSignature33>::compute (this=0x7fffffffdce0, output=...) at /usr/local/include/pcl-1.8/pcl/features/impl/feature.hpp:220
#13 0x0000000000437376 in main () at /home/amdanko/PCL_PLAYGROUND/testpf/pfh.cpp:34



I read some people get segmentation faults when compiling with C11 but I didn't ask it to do that in the cmake file. In case it is relevant, dpkg -l | grep libeigen tells me I have the 3.3~beta1-2 version of Eigen3



Thank you in advance for the help!
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

LuisRocha26
Hi,

I noticed two problems in your code:

1) I would bet your Normals are not correct. You loaded the same information into both normals and cloud with pcl::io::loadPCDFile ("testnew.pcd", *normals). The technique for normal estimation I'm aware of is described in this official tutorial. Also, maybe your PCD file contains normal information, so in this case you should load it into a PointXYZRGBNormal cloud or similar.

2) I'm not sure about this, but I think you need to set the input cloud in your KD-tree structure using setInputCloud(cloud).

Hope this helped you,

Luís Rocha
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

LuisRocha26
This post was updated on .
In reply to this post by petaq
PS.: Sorry, I overlooked your comment:

 // load point cloud -- I was having issues with the next line when I tried to load it as PointNormal?

Probably your cloud does contain normal information in addition to the XYZ coordinates of your points (and maybe other information, e.g. intensity or color), but a PointNormal cloud holds ONLY normals. In this case, I mentioned above, you should load it to a PointXYZRGBNormal or PointXYZINormal cloud.

[as far as I know, there's no PointXYZNormal point type]
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

petaq
Thank you for your response!

LuisRocha26 wrote
a PointNormal cloud holds ONLY normals. In this case, I mentioned above, you should load it to a PointXYZRGBNormal or PointXYZINormal cloud.
 This page  says that PointNormal stores the XYZ and normal data. Regardless!! I rewrote the code so you could see how I got the normals, so hopefully if I did do anything wrong there someone can spot it.


LuisRocha26 wrote
 I'm not sure about this, but I think you need to set the input cloud in your KD-tree structure using setInputCloud(cloud).
Sadly, regardless of whether I write tree2->setInputCloud (cloud); or not,  I still get a segmentation fault at fpfh.compute(*fpfhs) :(

Again, here is my code:
#include <pcl/point_types.h>
#include <pcl/features/fpfh.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/pcd_io.h>

int
main (int argc, char** argv)
{ 
///load data in......
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
  pcl::PCLPointCloud2 cloud_blob;
  pcl::io::loadPCDFile ("/home/amdanko/pcl/test/bun0.pcd", cloud_blob);
  pcl::fromPCLPointCloud2 (cloud_blob, *cloud);

//estimate normal ..
 pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
  ne.setInputCloud (cloud);

  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ());
  ne.setSearchMethod (tree);

  pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
  ne.setRadiusSearch (0.03);
  ne.compute (*normals);

// get features
  pcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33> fpfh;
  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree2 (new pcl::search::KdTree<pcl::PointXYZ> ());
  tree2->setInputCloud (cloud);

  fpfh.setInputCloud (cloud);
  fpfh.setInputNormals (normals);
  fpfh.setSearchMethod (tree2);
  fpfh.setRadiusSearch (0.05);

pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhs (new pcl::PointCloud<pcl::FPFHSignature33>);

std::cout << "does it die \n" ;
fpfh.compute(*fpfhs);  /// <---- it dies here :(
std::cout << "HERE? " ;
}

And here is where the segmentation fault (core dump) happens, with the tree->setInputCloud(cloud) line written in --  i didn't read it word for word but it looks like the same error as before :

Program received signal SIGSEGV, Segmentation fault.
Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >, Eigen::internal::assign_op<float>, 0>, 3, 0>::run (kernel=<synthetic pointer>)
    at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:386
386	      kernel.template assignPacket<dstAlignment, srcAlignment, PacketType>(index);


I am more or less copying the example off the website so it is quite a shame I can't get it to work :( i welcome any suggestions!
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

LuisRocha26
This post was updated on .
Ok, so your error persists.

When I was learning about feature descriptors, I had some issues when my search radius was to small. Are you sure 0.05 and 0.03 are good values for your input data? Remember the search radius must be somehow coherent with your cloud resolution, e.g., if your cloud has a resolution of about one point per 10 cm*, if your search radius is 5 cm probably you won't get anyone in the neighbourhood, and your computation will fail. This is the last thing I can think of.


* I know, it's a bit weird talking about 1 point/cm, because this is 3D structure (and perharps 1 point/cm³ would be more logical). But if you think of the AVERAGE DISTANCE between a point and its closest neighbour, this metric for "resolution" does make sense (and indeed this is, as far as I know, how the resolution of a cloud is computed, so to avoid hardcoding search radii and stuff).
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

javad329Gmail
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi
I have this problem also
it's debug output:

0  Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, 1, 0, -1, 1>>, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>>, Eigen::internal::assign_op<float>, 0>, 3, 0>::run /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_filters.so.1.8 386 0x7fa0ebc05390
1 Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>, Eigen::internal::assign_op<float>> /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_filters.so.1.8 653 0x7fa0ebc05390
2 Eigen::internal::Assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>, Eigen::internal::assign_op<float>, Eigen::internal::Dense2Dense, float>::run /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_filters.so.1.8 790 0x7fa0ebc05390
3 Eigen::internal::call_assignment_no_alias<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>, Eigen::internal::assign_op<float>> /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_filters.so.1.8 747 0x7fa0ebc05390
4 Eigen::internal::call_assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>, Eigen::internal::assign_op<float>>(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>> const&, Eigen::internal::assign_op<float> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>, Eigen::internal::evaluator_traits<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>>::Shape>::value, void *>::type) /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_features.so.1.8 712 0x7fa0e7432039
5 Eigen::internal::call_assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>> /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_features.so.1.8 693 0x7fa0e7432039
6 Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1>>::_set<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>> /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_features.so.1.8 682 0x7fa0e7432039
7 Eigen::Matrix<float, -1, 1, 0, -1, 1>::operator=<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1>>> /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_features.so.1.8 225 0x7fa0e7432039
8 Eigen::DenseBase<Eigen::Matrix<float, -1, 1, 0, -1, 1>>::setConstant /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_features.so.1.8 338 0x7fa0e7432039
9 Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1>>::setZero /home/javad/QtFeaturePCL/../../../usr/local/lib/libpcl_features.so.1.8 523 0x7fa0e7432039
10 pcl::PFHEstimation<pcl::PointXYZRGB, pcl::Normal, pcl::PFHSignature125>::computeFeature pfh.hpp 171 0x7fa0e7d2f4f3
11 pcl::Feature<pcl::PointXYZRGB, pcl::PFHSignature125>::compute feature.hpp 220 0x41a9a3
12 compute_PFH_features_at_keypoints main.cpp 121 0x412c00
13 correspondences_demo main.cpp 354 0x414d84
14 main main.cpp 393 0x415428

Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

stanly
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I have the same problem. I'm using example code from https://github.com/PointCloudLibrary/pcl/blob/master/doc/tutorials/content/sources/registration_api/example2.cpp
Input data are two frames from Kinect. I removed all NaNs and undersample frames althought I got segfault. Here is backtrace from gdb:

(gdb) bt
#0  0x00007ffff3420490 in _mm256_store_ps (__A=..., __P=<optimized out>) at /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include/avxintrin.h:854
#1  Eigen::internal::pstore<float, float __vector(8)>(float*, float __vector(8) const&) (from=..., to=<optimized out>)
    at /usr/local/include/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h:250
#2  Eigen::internal::pstoret<float, float __vector(8), 32>(float*, float __vector(8) const&) (from=..., to=<optimized out>)
    at /usr/local/include/eigen3/Eigen/src/Core/GenericPacketMath.h:474
#3  Eigen::internal::assign_op<float, float>::assignPacket<32, float __vector(8)>(float*, float __vector(8) const&) const (this=<optimized out>, b=...,
    a=<optimized out>) at /usr/local/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h:28
#4  Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >, Eigen::internal::assign_op<float, float>, 0>::assignPacket<32, 32, float __vector(8)>(long) (this=<synthetic pointer>, this=<synthetic pointer>, index=0)
    at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:658
#5  Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >, Eigen::internal::assign_op<float, float>, 0>, 3, 0>::run (kernel=<synthetic pointer>...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:416
#6  Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float, float> > (func=..., src=..., dst=...)
    at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:724
#7  Eigen::internal::Assignment<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float, float>, Eigen::internal::Dense2Dense, void>::run (func=..., src=..., dst=...)
    at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:862
#8  Eigen::internal::call_assignment_no_alias<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float, float> > (func=..., src=..., dst=...)
    at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:819
#9  Eigen::internal::call_assignment<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::assign_op<float, float> >(Eigen::Matrix<float, -1, -1, 0, -1, -1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::internal::assign_op<float, float> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >, Eigen::internal::evaluator_traits<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > >::Shape>::value, void*>::type) (func=..., src=..., dst=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:787
#10 Eigen::internal::call_assignment<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > > (src=..., dst=...) at /usr/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:765
#11 Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::_set<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > > (other=..., this=0x7fffffffd798) at /usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:710
#12 Eigen::Matrix<float, -1, -1, 0, -1, -1>::operator=<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, -1, 0, -1, -1> > > (other=..., this=<optimized out>) at /usr/local/include/eigen3/Eigen/src/Core/Matrix.h:225
#13 Eigen::DenseBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::setConstant (val=<optimized out>, this=0x7fffffffd798)
    at /usr/local/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h:327
---Type <return> to continue, or q <return> to quit---
#14 Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::setZero (this=this@entry=0x7fffffffd798, rows=rows@entry=190809, cols=11)
    at /usr/local/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h:536
#15 0x00007ffff3470491 in pcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33>::computeSPFHSignatures (this=this@entry=0x7fffffffd6d0,
    spfh_hist_lookup=std::vector of length 190868, capacity 190868 = {...}, hist_f1=..., hist_f2=..., hist_f3=...)
    at /home/sknot/DP/libs/pcl/features/include/pcl/features/impl/fpfh.hpp:208

#16 0x00007ffff3470711 in pcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33>::computeFeature (this=0x7fffffffd6d0, output=...)
    at /home/sknot/DP/libs/pcl/features/include/pcl/features/impl/fpfh.hpp:242
#17 0x00000000004d8e31 in pcl::Feature<pcl::PointXYZ, pcl::FPFHSignature33>::compute(pcl::PointCloud<pcl::FPFHSignature33>&) ()
#18 0x00000000004d0fcc in estimateFPFH(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > const&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > const&, boost::shared_ptr<pcl::PointCloud<pcl::Normal> > const&, boost::shared_ptr<pcl::PointCloud<pcl::Normal> > const&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > const&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > const&, pcl::PointCloud<pcl::FPFHSignature33>&, pcl::PointCloud<pcl::FPFHSignature33>&) ()
#19 0x00000000004d18ed in computeTransformation(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > const&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > const&, Eigen::Matrix<float, 4, 4, 0, 4, 4>&) ()
#20 0x00000000004d20c3 in main ()

Any hints?
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

stanly
This post has NOT been accepted by the mailing list yet.
Is it possible to be caused by -std=c++11 ? Any pcl expert?
Reply | Threaded
Open this post in threaded view
|

Re: Point Histogram Descriptors: Segmentation fault (core dumped)

stanly
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Ok guys, I fugured it out. I have rebuilt whole pcl library with c++11. I reached this by adding this line to the bottom of PCL CMakeLists.txt

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

And build PCL from source in release mode

cmake -DCMAKE_BUILD_TYPE=Release ..