hdl_global_localization
hdl_global_localization copied to clipboard
find_package(teaserpp REQUIRED)
Hi @koide3,
I try to build with teaser. I downloaded your modified teaser++ and make installed the lib into the default path/usr/local/
. Then the hdl_global_localization/CMakeLists.txt configs as following:
option(ENABLE_TEASER "Build with Teaser++" OFF)
find_package(teaserpp REQUIRED)
include_directories( ${teaserpp_INCLUDE_DIR} )
set(TEASER_LIBRARIES
teaserpp::teaser_registration
teaserpp::teaser_io
teaserpp::teaser_features
)
add_library(hdl_global_localization_teaser
src/hdl_global_localization/engines/global_localization_fpfh_teaser.cpp
)
target_link_libraries(hdl_global_localization_teaser
${TEASER_LIBRARIES}
)
target_link_libraries(hdl_global_localization
hdl_global_localization_teaser
)
When building, the output is:
CMake Error at hdl_global_localization_noted/CMakeLists.txt:45 (find_package):
By not providing "Findteaserpp.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "teaserpp",
but CMake did not find one.
Could not find a package configuration file provided by "teaserpp" with any
of the following names:
teaserppConfig.cmake
teaserpp-config.cmake
Add the installation prefix of "teaserpp" to CMAKE_PREFIX_PATH or set
"teaserpp_DIR" to a directory containing one of the above files. If
"teaserpp" provides a separate development package or SDK, be sure it has
been installed.
In the /usr/local/lib/cmake/teaserpp/
, there is no teaserppConfig.cmake
or teaserpp-config.cmake
, but teaserppTargets.cmake
and teaserppTargets-release.cmake
. How to fix this problem, thanks for your help and time!
/usr/local/lib/cmake/teaserpp/teaserppTargets.cmake
/usr/local/lib/cmake/teaserpp/teaserppTargets-release.cmake
Hi @narutojxl ,
You don't need to make & install teaser yourself. If you set ENABLE_TEASER=ON
, catkin_make
automatically clone and build teaser and install it in catkin_ws/devel
.
Hi @koide3, thanks for your reply. When i ENABLE_TEASER=ON
, CMakeLists.txt#L100 and #L105, the build output is:
The dependency target "teaser" of target "hdl_global_localization_teaser" does not exist.
The dependency target "teaser" of target "hdl_global_localization" does not exist.
comment the two lines, everything is OK.
BTW, if we want to use teaser as a standalone lib, for example other projects use teaser with find_package()
, how to fix the problem :)
Hi @koide3,
I also have tried to build teaser++ but failed. The error is different with @narutojxl I set ENABLE_TEASER=ON
and then catkin_make
. The error is:
In file included from /home/yutouwd/workspace/hdl_new_global/build/hdl_global_localization/teaser-prefix/src/teaser/teaser/include/teaser/fpfh.h:12:0,
from /home/yutouwd/workspace/hdl_new_global/build/hdl_global_localization/teaser-prefix/src/teaser/teaser/src/fpfh.cc:9:
/home/yutouwd/workspace/hdl_new_global/build/hdl_global_localization/teaser-prefix/src/teaser/teaser/include/pcl/fpfh.h:41:10: fatal error: pcl/features/fpfh.h: No such file or directory
#include <pcl/features/fpfh.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/yutouwd/workspace/hdl_new_global/build/hdl_global_localization/teaser-prefix/src/teaser/teaser/src/matcher.cc:9:0:
/home/yutouwd/workspace/hdl_new_global/build/hdl_global_localization/teaser-prefix/src/teaser/teaser/include/teaser/matcher.h:12:10: fatal error: pcl/point_cloud.h: No such file or directory
#include <pcl/point_cloud.h>
It seems it could not find PCL. But when I build teaser++ by using cmake .. && make
, it doesn't have any error. Do you have some suggestions to fix it. Thanks for your help.
Hi @narutojxl ,
I personally didn't want to install teaser on the system and chose to build it locally in catkin_ws
. But, maybe it's good to support a way with find_package()
as well. I'll update CMakeLists
so that it checks if teaser is installed on the system and use it if available.
@yutouwd ,
Can you build teaser with cmake .. -DBUILD_TEASER_FPFH=ON
?
Hi @koide3, thanks for your suggestions. I have asked the raw teaser's author how to use teaser with find_package()
. If anybody knows how to use, please give a comment, i will be appreciated much.
Hi @koide3,
Thanks for your reply. I build teaser with cmake .. -DBUILD_TEASER_FPFH=ON
. It would have the same problem. I'm using Ubuntu18.04 and PCL version is 1.8.
Hi @koide3, Thanks for your reply. I build teaser with
cmake .. -DBUILD_TEASER_FPFH=ON
. It would have the same problem. I'm using Ubuntu18.04 and PCL version is 1.8.
Dear Koide @koide3,
I run into the same issue with @yutouwd. Any solution for this?
Thanks and best regards, William
Hi @koide3, Thanks for your reply. I build teaser with
cmake .. -DBUILD_TEASER_FPFH=ON
. It would have the same problem. I'm using Ubuntu18.04 and PCL version is 1.8.Dear Koide @koide3,
I run into the same issue with @yutouwd. Any solution for this?
Thanks and best regards, William
This link may be the answer. https://teaser.readthedocs.io/en/latest/installation.html#installing-dependencies