Using pcl::VoxelFilter with PointCloud2 leads to crash
I've been porting working code from fuerte to groovy and ran into a strange crash in ros_pcl, since both are based on pcl1.6 it seems that this is may be a Groovy induced bug. The below code crashes with an "Illegal Instruction" when filter() is called on the VoxelFilter. Any ideas whats going wrong?
void pointCloudCallback (const sensor_msgs::PointCloud2Ptr& input) {
std::cout << "Input cloud size " << input->data.size() << std::endl;
if(input->data.size() <= 0){
return;
}
sensor_msgs::PointCloud2::Ptr cloud (new sensor_msgs::PointCloud2);
sensor_msgs::PointCloud2 downSampledInput;
//Downsample input point cloud
pcl::VoxelGrid<sensor_msgs::PointCloud2> downsample;
downsample.setInputCloud(input);
downsample.setLeafSize(0.20f, 0.20f, 0.20f);
downsample.filter(downSampledInput); //Illegal Instruction here
//Transform into base_link
try{
pcl_ros::transformPointCloud(string("/base_link"), downSampledInput, *cloud, *_tfListener);
}
catch(tf::TransformException ex){
ROS_ERROR("TFException %s",ex.what());
return;
}
_pointsPub.publish(cloud);
}
Call Stack:
pcl::VoxelGrid<sensor_msgs::PointCloud2_<std::allocator<void> > >::applyFilter(sensor_msgs::PointCloud2_<std::allocator<void> >&) /opt/ros/groovy/lib/libpcl_filters.so.1.6
pcl::Filter<sensor_msgs::PointCloud2_<std::allocator<void> > >::filter(sensor_msgs::PointCloud2_<std::allocator<void> >&) /opt/ros/groovy/lib/libpcl_filters.so.1.6
pointCloudCallback point_downsample_node.cpp
Asked by Alan Meekins on 2013-06-06 14:04:32 UTC
Comments
Crash occurs even when pcl::VoxelGridpcl::PointXYZ is used with converted point clouds. Call stack is the same
Asked by Alan Meekins on 2013-06-06 14:27:30 UTC
Do you have the most recent version of the pcl libs? There was an update 2 or 3 days ago which fixed an error causing "Illegal instruction" errors.
Asked by alex_rockt on 2013-06-06 20:18:53 UTC
Which packages are you referring to? So since my initial post I've updated the machine from Ubuntu 12.04 to 12.10, purged all of ROS and did a reinstall using the Quantal packages. Then ran
sudo apt-get install ros-groovy-pcl*
Still getting illegal instruction crashes
Asked by Alan Meekins on 2013-06-07 14:11:56 UTC
Hey, sorry, I ignored that you are on groovy. The groovy packages were updated yesterday I think. So you should try to update again.
Asked by alex_rockt on 2013-06-09 20:07:51 UTC
Hey, I ve got the same issue, but moving on.. My System: Ubuntu 12.04 LTS Intel® Core™2 Duo CPU E6550 @ 2.33GHz × 2 with 4GB RAM
Asked by Josef on 2013-06-26 01:37:34 UTC