Segmentation fault when including pcl/filters/voxel_grid.h [closed]

asked 2014-12-01 16:54:41 -0500

Bidski gravatar image

Hi, I am getting a bizarre error. I have some simple code that I took from the pcl tutorials page. The modifications are just to allow flexibility with the specification of the input and output files. My catkin package can be seen here.

As can be seen in src/voxel_grid.cpp a lot of the code has been commented out. Leaving only

#include <iostream>
#include <string>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
//#include <pcl/filters/voxel_grid.h>

int main(int argc, char** argv)
    pcl::PCDReader reader;

You will notice the commented out include line (voxel_grid.h). If this line remains commented out there are no issues with the code. If I uncomment it, I get a segmentation fault.

To run the code, I use

cd ~/catkin_ws
rosrun pcl_tutorials voxel_grid

Why would this be causing a segmentation fault?

The CMakeLists.txt and package.xml files are included in the link above. PCL and ROS were installed via apt-get, I am running Ubuntu 14.04.


edit retag flag offensive reopen merge delete

Closed for the following reason PCL Question: The PCL community prefers to answer questions at by tfoote
close date 2014-12-01 17:47:40.361845