Rtabmap and octomap for ros2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Rtabmap and octomap for ros2

marpeja
How can I make it possible for Rtabmap_ros to work with octomap. I see in the documentation that I need to build rtabmap_ros with octomap, but I don't know how to this...

I tried putting this in the CMakeLists.txt:

find_package(octomap_msgs)
find_package(octomap REQUIRED)
include_directories(${OCTOMAP_INCLUDE_DIRS})
link_libraries(${OCTOMAP_LIBRARIES})

And this in the package.xml:

<build_depend>octomap</build_depend>
<build_depend>octomap_msgs</build_depend>
<exec_depend>octomap</exec_depend>
<exec_depend>octomap_msgs</exec_depend>

But still doesn't work. I get the following errors:

CMake Warning at CMakeLists.txt:496 (add_executable):
  Cannot generate a safe runtime search path for target
  rtabmap_pointcloud_to_depthimage because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [liboctomap.so.1.9] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /opt/ros/galactic/lib
    runtime library [liboctomath.so.1.9] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /opt/ros/galactic/lib

  Some of these libraries may not be found correctly.
Reply | Threaded
Open this post in threaded view
|

Re: Rtabmap and octomap for ros2

matlabbe
Administrator

It seems you have two liboctomap.so installed on the computer. This is a cmake warning, you may ignore it (if both octomap have the same version) unless you experience seg fault.