@@ -111,7 +111,7 @@ class PointCloudGrid
111111 // Build KD-Tree
112112 typedef nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<double ,
113113 PCLPointCloudAdaptor<PointT>>,
114- PCLPointCloudAdaptor<PointT>, 3 > KDTree;
114+ PCLPointCloudAdaptor<PointT>, 3 , size_t > KDTree;
115115 bool checkIndex3DInGrid (const Index3D & index) const ;
116116
117117 void setDistToGround (double z)
@@ -681,7 +681,7 @@ void PointCloudGrid<PointT>::expandGrid(std::queue<Index3D> q)
681681 KDTree tree (3 , pclAdaptor, build_params);
682682 tree.buildIndex ();
683683
684- const float radius = grid_config.centroidSearchRadius * grid_config.centroidSearchRadius ; // nanoflann uses squared radius
684+ const double radius = grid_config.centroidSearchRadius * grid_config.centroidSearchRadius ; // nanoflann uses squared radius
685685
686686 while (!q.empty ()) {
687687 Index3D idx = q.front ();
@@ -699,9 +699,9 @@ void PointCloudGrid<PointT>::expandGrid(std::queue<Index3D> q)
699699
700700 // Prepare radius search
701701#if NANOFLANN_VERSION >= 0x150
702- using Neighbor = nanoflann::ResultItem<unsigned int , double >;
702+ using Neighbor = nanoflann::ResultItem<size_t , double >;
703703#else
704- using Neighbor = std::pair<unsigned int , double >;
704+ using Neighbor = std::pair<size_t , double >;
705705#endif
706706
707707 std::vector<Neighbor> neighbors;
0 commit comments