[RTAB-Map] How to connect custom code from core to ROS 2 wrapper (Ubuntu 22.04, ROS 2 Humble)

Posted by GGYU on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RTAB-Map-How-to-connect-custom-code-from-core-to-ROS-2-wrapper-Ubuntu-22-04-ROS-2-Humble-tp11105.html

Dear Mathieu,

I’m currently using RTAB-Map on Ubuntu 22.04 with ROS 2 Humble, and I’m looking to customize the system by adding a feature into the RTAB-Map core (standalone) and making it accessible via the ROS 2 wrapper (rtabmap_ros).

To proceed effectively, I’d appreciate some guidance on how to approach this integration.

❓Questions
Which part of the RTAB-Map core should be modified to add custom processing or features?
For example, is Rtabmap.cpp, RtabmapEvent.cpp, or some other entry point generally used for this purpose?

What’s the recommended way to expose this new core functionality to the ROS 2 wrapper?
Should this be done by extending CoreWrapper.cpp, or would it be better to define a new topic/service interface?

Are there any existing examples of RTAB-Map core features being exposed to the ROS 2 wrapper that I could refer to?
For instance, how were functions like get_map, set_goal, or reset connected between core and wrapper?

🧩 Environment
OS: Ubuntu 22.04

ROS: ROS 2 Humble

RTAB-Map: Built from latest GitHub source

Any advice or guidance would be highly appreciated. Thank you for your time and your amazing work on RTAB-Map!

If the development is successful, I would also like to publish a paper based on this work.

Thank you always for your dedication and hard work.

Best regards,
GGYU