在slam画点云图的过程中pcl库提示:
Leaf size is too small for the input dataset. Integer indices would overflow.
解决办法:
1,改变leaf size大小,将它变大,但是这样会使得点云图很难看
2,点云范围太大了,限制点云的范围,可能是由于匹配过程中某些点出现了错误,匹配到了远处的地方:
加入头文件:
#include <pcl/filters/passthrough.h>
然后使用以下语句限制点云的范围
pcl::PassThrough<PointT> pass;
pass.setInputCloud (newCloud);
pass.setFilterFieldName ("z");
pass.setFilterLimits (0, 5);
pass.filter (*newCloud);