mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
util3d::voxelize() added warning if cloud is not dense, indices empty but cloud not empty
This commit is contained in:
@@ -201,6 +201,10 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr voxelize(
|
|||||||
}
|
}
|
||||||
filter.filter(*output);
|
filter.filter(*output);
|
||||||
}
|
}
|
||||||
|
else if(cloud->size() && !cloud->is_dense && indices->size() == 0)
|
||||||
|
{
|
||||||
|
UWARN("Cannot voxelize a cloud not dense with empty indices! (input=%d pts)", (int)cloud->size());
|
||||||
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
pcl::PointCloud<pcl::PointNormal>::Ptr voxelize(
|
pcl::PointCloud<pcl::PointNormal>::Ptr voxelize(
|
||||||
@@ -221,6 +225,10 @@ pcl::PointCloud<pcl::PointNormal>::Ptr voxelize(
|
|||||||
}
|
}
|
||||||
filter.filter(*output);
|
filter.filter(*output);
|
||||||
}
|
}
|
||||||
|
else if(cloud->size() && !cloud->is_dense && indices->size() == 0)
|
||||||
|
{
|
||||||
|
UWARN("Cannot voxelize a not dense (organized) cloud with empty indices! (input=%d pts). Returning empty cloud!", (int)cloud->size());
|
||||||
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr voxelize(
|
pcl::PointCloud<pcl::PointXYZRGB>::Ptr voxelize(
|
||||||
@@ -241,6 +249,10 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr voxelize(
|
|||||||
}
|
}
|
||||||
filter.filter(*output);
|
filter.filter(*output);
|
||||||
}
|
}
|
||||||
|
else if(cloud->size() && !cloud->is_dense && indices->size() == 0)
|
||||||
|
{
|
||||||
|
UWARN("Cannot voxelize a not dense (organized) cloud with empty indices! (input=%d pts). Returning empty cloud!", (int)cloud->size());
|
||||||
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr voxelize(
|
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr voxelize(
|
||||||
@@ -261,6 +273,10 @@ pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr voxelize(
|
|||||||
}
|
}
|
||||||
filter.filter(*output);
|
filter.filter(*output);
|
||||||
}
|
}
|
||||||
|
else if(cloud->size() && !cloud->is_dense && indices->size() == 0)
|
||||||
|
{
|
||||||
|
UWARN("Cannot voxelize a not dense (organized) cloud with empty indices! (input=%d pts). Returning empty cloud!", (int)cloud->size());
|
||||||
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user