appliedAI-Initiative/orb_slam_2_ros

find_package(orb_slam2_ros REQUIRED) can't find DBoW2

clydemcqueen opened this issue · 1 comments

In ROS2 Foxy:

I'm trying to extend orb_slam2_ros by referencing it in another ament CMake file. When I add this line:

find_package(orb_slam2_ros REQUIRED)

I get this result:

CMake Error at /home/clyde/ros2/orca3_ws/install/orb_slam2_ros/share/orb_slam2_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
  By not providing "FindDBoW2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "DBoW2", but
  CMake did not find one.

  Could not find a package configuration file provided by "DBoW2" with any of
  the following names:

    DBoW2Config.cmake
    dbow2-config.cmake

  Add the installation prefix of "DBoW2" to CMAKE_PREFIX_PATH or set
  "DBoW2_DIR" to a directory containing one of the above files.  If "DBoW2"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /home/clyde/ros2/orca3_ws/install/orb_slam2_ros/share/orb_slam2_ros/cmake/orb_slam2_rosConfig.cmake:41 (include)
  CMakeLists.txt:39 (find_package)

I don't see any package configuration file. I'm spelunking CMake and ament to see if there's a workaround or patch, but perhaps somebody has already figured this out?

Thanks,
/Clyde

I worked around this by providing FindDBoW2.cmake, but then I discovered that orb_slam2_ros doesn't export header files and so forth. This is a pretty big refactor, so... I suppose not worth it. I will continue to add custom code to my branch(es). Closing.