yaoyx689 / Fast-Robust-ICP

MIT License
577 stars 92 forks source link

compile error eigen -> eigen3 and No matching fct nanoflann::KDTreeSingleIndexAdaptorParams #7

Open busybeaver42 opened 3 years ago

busybeaver42 commented 3 years ago

First error: bugfix in type.h and FRICP.h change entry:

include <eigen/...> to #include <eigen3/...>

second error: Fast-Robust-ICP/ICP.h:44:57: error: no matching function for call to ‘nanoflann::KDTreeSingleIndexAdaptorParams::KDTreeSingleIndexAdaptorParams(const int&, const size_t&)’ index = new index_t(dims, *this, nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size, dims)); solution is open, ...

busybeaver42 commented 3 years ago

No support here, but I found a solution:

First install nanoflann: https://github.com/jlblancoc/nanoflann

fix in type.h and FRICP.h

include <eigen/...> to #include <eigen3/...>

Fix in ICP.h line 44: //index = new index_t(dims, this, nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size, dims)); index = new index_t(dims, this, nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size));

ljjTYJR commented 2 years ago

No support here, but I found a solution:

First install nanoflann: jlblancoc/nanoflann

fix in type.h and FRICP.h #include <eigen/...> to #include <eigen3/...> Fix in ICP.h line 44: //index = new index_t(dims, this, nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size, dims)); index = new index_t(dims, this, nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size));

It seems that in include/ directory, there exists a file called nanoflann.hpp, but maybe the author didnot add the path to the makefile.

greymfm commented 1 year ago

Solution:

  1. Edit makefile 'CMakeLists.txt' and remove any system NanoFlann-library (comment out):

    --- Nanoflann

    find_package(NanoFlann REQUIRED)

    include_directories(${NANOFLANN_INCLUDE_DIR})

  2. Edit 'ICP.h' and change to project-included NanoFlann:

    include "include/nanoflann.hpp"