rtabmap icon indicating copy to clipboard operation
rtabmap copied to clipboard

Issue compiling for Ros2 Humble

Open alexandru-g opened this issue 1 year ago • 1 comments

Hello! I'm a newbie in ROS, so please excuse me.

I'm having the following issue compiling, which seems like a CMake problem because the header exists: /home/pi/ros2_humble/src/rtabmap/corelib/src/global_map/GridMap.cpp:39:10: fatal error: grid_map_core/iterators/GridMapIterator.hpp: No such file or directory 39 | #include <grid_map_core/iterators/GridMapIterator.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/build.make:1826: corelib/src/CMakeFiles/rtabmap_core.dir/global_map/GridMap.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:899: corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2 gmake: *** [Makefile:156: all] Error 2

I'm compiling on the RPi 5 (so arm64) and I don't know exactly what other details are important:

  • rtabmap branch - master
  • grid_map branch - humble
  • I had to make these changes to grid_map due to a different compiling issue

Any input would be appreciated, thank you!

alexandru-g avatar Oct 23 '24 09:10 alexandru-g

Can you do:

cd /home/pi/ros2_humble/build/rtabmap
make VERBOSE=1

and show log up to this error? Here is how we add include directories of grid_map_core target: https://github.com/introlab/rtabmap/blob/e3fde4ecdd8e40c6634903b6aee2cdf4b95cd24a/corelib/src/CMakeLists.txt#L645-L665

Based on humble branch of grid_map_core, the include directory should be correctly added to library target: https://github.com/ANYbotics/grid_map/blob/69c100f35fe1984120d73bbad398f6bc28ff8cc1/grid_map_core/CMakeLists.txt#L42

matlabbe avatar Oct 26 '24 21:10 matlabbe