segmentObstaclesFromGround() fixed identical ground and obstacles indices

This commit is contained in:
matlabbe
2016-06-14 11:55:58 -04:00
parent 4a3f490814
commit abd376a44c

View File

@@ -116,14 +116,17 @@ void segmentObstaclesFromGround(
}
//Cluster remaining stuff (obstacles)
std::vector<pcl::IndicesPtr> clusteredObstaclesSurfaces = util3d::extractClusters(
cloud,
otherStuffIndices,
clusterRadius,
minClusterSize);
if(otherStuffIndices->size())
{
std::vector<pcl::IndicesPtr> clusteredObstaclesSurfaces = util3d::extractClusters(
cloud,
otherStuffIndices,
clusterRadius,
minClusterSize);
// merge indices
obstacles = util3d::concatenate(clusteredObstaclesSurfaces);
// merge indices
obstacles = util3d::concatenate(clusteredObstaclesSurfaces);
}
}
}
}