Segmentation fault when including pcl/filters/voxel_grid.h [closed]
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;
return(0);
}
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
catkin_make
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.
Bidski