mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
segmentObstaclesFromGround: Added epsilon for ground surface inclusion inside maximum and minimum heights
This commit is contained in:
@@ -71,7 +71,7 @@ void segmentObstaclesFromGround(
|
|||||||
{
|
{
|
||||||
Eigen::Vector4f centroid;
|
Eigen::Vector4f centroid;
|
||||||
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
|
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
|
||||||
if(centroid[2] >= min[2] && centroid[2] <= max[2])
|
if(centroid[2] >= min[2]-0.01 && centroid[2] <= max[2]+0.01) // epsilon
|
||||||
{
|
{
|
||||||
ground = util3d::concatenate(ground, clusteredFlatSurfaces.at(i));
|
ground = util3d::concatenate(ground, clusteredFlatSurfaces.at(i));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user