ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I believe that you need to initialize the PCLPointCloud2. Currently, it appears that you are dereferencing an uninitialized pointer.

pcl::PCLPointCloud2Ptr cloud_unfiltered(new pcl::PointCloud2());
pcl::toPCLPointCloud2(cloud, *cloud_unfiltered); // LINE 29!!

Or, skip the pointer.

pcl::PCLPointCloud2 cloud_unfiltered;
pcl::toPCLPointCloud2(cloud, cloud_unfiltered);