mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
fixed warning ("centroid" may be not initialized)...
This commit is contained in:
@@ -108,7 +108,7 @@ void segmentObstaclesFromGround(
|
|||||||
{
|
{
|
||||||
if((int)i!=biggestFlatSurfaceIndex)
|
if((int)i!=biggestFlatSurfaceIndex)
|
||||||
{
|
{
|
||||||
Eigen::Vector4f centroid;
|
Eigen::Vector4f centroid(0,0,0,1);
|
||||||
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
|
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
|
||||||
if(centroid[2] >= min[2]-0.01 &&
|
if(centroid[2] >= min[2]-0.01 &&
|
||||||
(centroid[2] <= max[2]+0.01 || (maxGroundHeight>0 && centroid[2] <= maxGroundHeight+0.01))) // epsilon
|
(centroid[2] <= max[2]+0.01 || (maxGroundHeight>0 && centroid[2] <= maxGroundHeight+0.01))) // epsilon
|
||||||
|
|||||||
Reference in New Issue
Block a user