sbgisen / fast_gicp

A collection of GICP-based fast point cloud registration algorithms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[NDT_CUDA] "Invalid (NaN, Inf) point coordinates given to nearestKSearch!"' failed. #2

Closed nyxrobotics closed 8 months ago

nyxrobotics commented 8 months ago

概要 下記のエラーにより落ちる

nodelet: /build/pcl-gWGA5r/pcl-1.10.0+dfsg/kdtree/include/pcl/kdtree/impl/kdtree_flann.hpp:138: int pcl::KdTreeFLANN<PointT, Dist>::nearestKSearch(const PointT&, int, std::vector<int>&, std::vector<float>&) const [with PointT = pcl::PointXYZI; Dist = flann::L2_Simple<float>]: Assertion `point_representation_->isValid (point) && "Invalid (NaN, Inf) point coordinates given to nearestKSearch!"' failed.

x0の成分にNaNが入ってしまうことがあるらしく、その際に下記でAssertionが発生する https://github.com/sbgisen/fast_gicp/blob/9f99ce38485f83da19928e1e5dc9c42dda71a268/include/fast_gicp/gicp/impl/lsq_registration_impl.hpp#L77-L78

x0にNaNが入っている場合を例外にして処理をスキップしたい

再現手順 修正しないとどう困るか 原因 修正案