seg fault using pcl::PCDReader with c++11 [closed]

asked 2016-03-05 19:20:34 -0500

Samer gravatar image

updated 2016-03-05 19:22:50 -0500

I have a code which was running fine until I switched to C++11. I have been debugging this error for a long time, until I narrow it down to this line pcl::PCDReader reader;

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

I tried also this method to read point cloud file and I got the same problem,

if (pcl::io::loadPCDFile<pcl::PointXYZ> (argv[1], *cloud_filtered) == -1) //* load the file
    PCL_ERROR ("Couldn't read file test_pcd.pcd \n");
    return (-1);

I think something is wrong with IO process... I am using these headers:

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <pcl/ModelCoefficients.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/segmentation/plane_coefficient_comparator.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/kdtree/kdtree.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/segmentation/extract_clusters.h>
#include <pcl/visualization/cloud_viewer.h>

I am using PCL 1.7 on 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 ahendrix
close date 2016-03-05 20:02:08.870408