linemod trainer segmentation fault

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

linemod trainer segmentation fault

Dabox
This post was updated on .
I am using the linemod_trainer in pcl.
I am getting a very bad segmentation fault error when calling processInputData in trainTemplate():

pcl::ColorGradientModality<pcl::PointXYZRGBA> color_grad_mod;
  color_grad_mod.setInputCloud (input);
  color_grad_mod.processInputData ();


The input cloud is not empty and the object has been segmented correctly before by compute(); is there any assumption on the input cloud? Even the normal modality is crashing so I assume something is wrong about the input cloud..
rwd
Reply | Threaded
Open this post in threaded view
|

Re: linemod trainer segmentation fault

rwd
Hi,

Did you by any chance get to the bottom of this? I am also having the same issue with my input data resulting in a seg faults in both modalities when calling processInputData().

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: linemod trainer segmentation fault

cloudian
In reply to this post by Dabox
I also got a segmentation fault when calling the processInputData function of the ColorGradientModality class. Here is my backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x000055555558e940 in pcl::filters::Convolution<pcl::RGB, pcl::RGB>::makeInfinite (this=0x7fffffffd180, p=...)
    at /usr/include/pcl-1.8/pcl/filters/impl/convolution.hpp:399
399      p.r = 0; p.g = 0; p.b = 0;
(gdb) bt
#0  0x000055555558e940 in pcl::filters::Convolution<pcl::RGB, pcl::RGB>::makeInfinite (this=0x7fffffffd180, p=...)
    at /usr/include/pcl-1.8/pcl/filters/impl/convolution.hpp:399
#1  0x000055555559f91b in pcl::filters::Convolution<pcl::RGB, pcl::RGB>::convolve_cols (this=0x7fffffffd180, output=...)
    at /usr/include/pcl-1.8/pcl/filters/impl/convolution.hpp:554
#2  0x000055555559ca73 in pcl::filters::Convolution<pcl::RGB, pcl::RGB>::convolveCols (this=0x7fffffffd180, output=...)
    at /usr/include/pcl-1.8/pcl/filters/impl/convolution.hpp:118
#3  0x0000555555597a64 in pcl::filters::Convolution<pcl::RGB, pcl::RGB>::convolve (this=0x7fffffffd180, output=...)
    at /usr/include/pcl-1.8/pcl/filters/impl/convolution.hpp:157
#4  0x00005555555947c4 in pcl::ColorGradientModality<pcl::PointXYZRGB>::processInputData (this=0x7fffffffd4e0)
    at /usr/include/pcl-1.8/pcl/recognition/color_gradient_modality.h:384

This happened when using an unorganized point cloud (no known width and height). If I use an organized one, it worked. My guess is that the convolution filters require this kind of structure, as the convolution operator needs to access the neighbouring values.