obstacles_detection: added empty cloud verification

This commit is contained in:
Mathieu Labbe
2015-03-27 17:20:14 -04:00
parent c75ef5c578
commit f0b7b183c5
+5 -2
View File
@@ -134,8 +134,11 @@ private:
{ {
cloud = rtabmap::util3d::passThrough<pcl::PointXYZ>(cloud, "z", std::numeric_limits<int>::min(), maxObstaclesHeight_); cloud = rtabmap::util3d::passThrough<pcl::PointXYZ>(cloud, "z", std::numeric_limits<int>::min(), maxObstaclesHeight_);
} }
rtabmap::util3d::segmentObstaclesFromGround<pcl::PointXYZ>(cloud, if(cloud->size())
ground, obstacles, normalEstimationRadius_, groundNormalAngle_, minClusterSize_); {
rtabmap::util3d::segmentObstaclesFromGround<pcl::PointXYZ>(cloud,
ground, obstacles, normalEstimationRadius_, groundNormalAngle_, minClusterSize_);
}
} }
pcl::PointCloud<pcl::PointXYZ>::Ptr groundCloud(new pcl::PointCloud<pcl::PointXYZ>); pcl::PointCloud<pcl::PointXYZ>::Ptr groundCloud(new pcl::PointCloud<pcl::PointXYZ>);