cilantro icon indicating copy to clipboard operation
cilantro copied to clipboard

How can I reuse an ICP for multi source?

Open lingerer opened this issue 11 months ago • 1 comments

When I use a SimpleCombinedMetricICP3> icp(map3d->points, map3d->normals, cdp.points); I found it took a long time to init the dst_tree_ptr_ like:

      if (!dst_tree_ptr_)
        dst_tree_ptr_.reset(new SearchTree(dst_search_features_adaptor_.getFeaturesMatrixMap()));

Is it possible to reuse the pointer and just change the source to speed up small to large icp?

lingerer avatar May 19 '25 17:05 lingerer

That is a good point for improvement! We might have to slightly modify CorrespondenceSearchKDTree to support that usecase. PRs are always welcome!

kzampog avatar Jun 21 '25 01:06 kzampog

I added setters/getters here: https://github.com/kzampog/cilantro/commit/9d679dc3df5d4c4c617f1b8532c695a09d521da8#diff-8f79adb5cf8e0096c83e18e2300f710837a4e04c29d87290dcf7fc51573eced9R275-R278 that I think could accommodate your usecase!

kzampog avatar Jun 21 '25 08:06 kzampog