fixed warning ("centroid" may be not initialized)...

This commit is contained in:
matlabbe
2016-09-01 14:55:19 -04:00
parent 76298e86be
commit 87b9f30dce

View File

@@ -108,7 +108,7 @@ void segmentObstaclesFromGround(
{
if((int)i!=biggestFlatSurfaceIndex)
{
Eigen::Vector4f centroid;
Eigen::Vector4f centroid(0,0,0,1);
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
if(centroid[2] >= min[2]-0.01 &&
(centroid[2] <= max[2]+0.01 || (maxGroundHeight>0 && centroid[2] <= maxGroundHeight+0.01))) // epsilon