ground segmentaiton: adjusted cluster inlier with centroid below max height of biggest cluster

This commit is contained in:
matlabbe
2018-02-18 15:30:20 -05:00
parent 07244a8a73
commit 00559ce8d6
2 changed files with 2 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ void segmentObstaclesFromGround(
{
Eigen::Vector4f centroid(0,0,0,1);
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
if(maxGroundHeight==0.0f || centroid[2] <= maxGroundHeight) // epsilon
if(maxGroundHeight==0.0f || centroid[2] <= maxGroundHeight || centroid[2] <= max[2]) // epsilon
{
ground = util3d::concatenate(ground, clusteredFlatSurfaces.at(i));
}