Rtabmap and octomap in ROS2


I am trying to get an octomap using Rtabmap. As instructed in the Rtabmap documentation, this is done automatically if Rtabmap_ros is built with Octomap.

I tried to so by adding this into the CMakeLists.txt file of Rtabmap_ros:

find_package(octomap REQUIRED) 

And also this into the Package.xml:


When building again the package I get the following warning:

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:
    runtime library [liboctomath.so.1.9] in /usr/lib/x86_64-linux-gnu may be hidden by files in:

  Some of these libraries may not be found correctly.

However, if I build it again, the warning disappears. The problem is that although the /octomap_full topic is being published, its data is empty…


Can anybody help me? I need this done for an important project