Skip to content

Add rtabmap_ros - #109

Merged
Tobias-Fischer merged 20 commits into
mainfrom
ports/rtabmap-ros
Oct 25, 2026
Merged

Tobias-Fischer merged 20 commits into
mainfrom
ports/rtabmap-ros

Conversation

@Tobias-Fischer

@Tobias-Fischer Tobias-Fischer commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Ports RoboStack/ros-lyrical#83 by @baradejoo: adds rtabmap_ros to the shared selection, on all platforms. The rtabmap library is already selected.

The PR's patches, refreshed for 0.23.13 (humble, jazzy and lyrical after their syncs; rolling has no rtabmap_ros release), as shared patches:

  • rtabmap_conversions, rtabmap_odom, rtabmap_rviz_plugins, rtabmap_slam: the aarch64 find_library probes not REQUIRED, OpenCV 5 (features.hpp, cv::COLOR_BGR2GRAY); unchanged from the PR.
  • rtabmap_viz: only the macOS OpenGL context fix in GuiNode.cpp; its CMake hunk is upstream in 0.23.13.
  • rtabmap_msgs, rtabmap_sync: no longer needed (upstream made those probes optional).
  • humble: rtabmap_viz and rtabmap_rviz_plugins are excluded, both because humble's RViz and Qt stack is Qt 5 while conda-forge's VTK (and so PCL, and rtabmap's GUI) is Qt 6. rtabmap_rviz_plugins links PCL into a Qt 5 RViz plugin ("INTERFACE_QT_MAJOR_VERSION of Qt6::OpenGL does not agree"), and rtabmap_viz needs rtabmap's GUI, which humble builds without Qt for the same reason (tried locally). - jazzy: rtabmap_rviz_plugins is excluded for the same reason (its RViz is Qt 5 too; same CMake error on linux-64). jazzy's rtabmap_viz builds and stays: it links only rtabmap's Qt 6 (no RViz).

Windows:

  • rtabmap_conversions, rtabmap_odom, rtabmap_slam, rtabmap_util: export all symbols; rtabmap_odom/slam/util/viz add %LIBRARY_LIB% to the link path (rtabmap's config links some PCL libraries by bare name) and NOMINMAX.
  • Small source patches: rtabmap_sync exports its CommonDataSubscriber class explicitly (C2487), rtabmap_odom/rtabmap_slam undefine windows.h's ERROR, rtabmap_viz uses signal() instead of sigaction, rtabmap_costmap_plugins/rtabmap_rviz_plugins define the macro their visibility headers check.
  • velodyne_laserscan (pulled in by rtabmap_examples): _USE_MATH_DEFINES and exports all symbols.
  • velodyne, velodyne_driver, velodyne_pointcloud are excluded on Windows (packages_exclude): the driver reads the sensor over POSIX sockets and needs libpcap. So rtabmap_examples on Windows comes without its velodyne dependencies.

Recipe test: the rtabmap SLAM node starts and keeps running (shared/tests/ros2-rtabmap-slam.yaml).

Built locally

  • lyrical, osx-arm64: all rtabmap_* packages incl. recipe tests; rtabmap (rtabmap_slam) starts and rtabmap_viz is installed.
  • humble, osx-arm64: all rtabmap_* packages except the two excluded ones, and the rtabmap_ros metapackage, incl. recipe tests; rtabmap_util needed a humble patch (it asks for rtabmap's gui component without using it).
  • jazzy, linux-64: rtabmap_viz and rgbd_image_viewer link Qt 6 only; rtabmap_rviz_plugins failed as on humble, hence the exclusion. With it excluded, all 14 other rtabmap_* packages and the rtabmap_ros metapackage build, with their recipe tests.

CI: full PR build green on humble, jazzy and lyrical (rolling has no rtabmap_ros release), all platforms (linux-64, linux-aarch64, osx-64, osx-arm64, win-64). The rosdistro syncs this was prepared on are merged.

🤖 Generated with Claude Code

Tobias-Fischer and others added 7 commits October 19, 2026 09:18
Ports RoboStack/ros-lyrical#83, refreshed for 0.23.13 (all of humble, jazzy
and lyrical after their syncs; rolling has no rtabmap_ros release): the
aarch64 find_library probes stay optional (upstream made them optional for
rtabmap_msgs/rtabmap_sync/rtabmap_viz, the other four still need it),
OpenCV 5 headers and constants, and rtabmap_viz's macOS OpenGL context fix.

Co-authored-by: Kamil Baradziej <49471097+baradejoo@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
humble's rtabmap was configured with WITH_QT=OFF (and GTSAM off on
Windows) when it was at 0.22.1, to avoid porting the GUI to OpenCV 5. After
the sync it's 0.23.13 like jazzy, with the same patch, and rtabmap_viz
needs the gui component, so use jazzy's settings. rtabmap needs a rebuild
for humble.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts the previous commit: rtabmap takes its Qt version from VTK, which
is Qt 6 on conda-forge, while humble's RViz is Qt 5, so rtabmap with its GUI
breaks rtabmap_rviz_plugins (Qt5 and Qt6 targets in one target). Keep
humble's rtabmap without Qt as before and exclude rtabmap_viz, the package
that needs the GUI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It links PCL, whose VTK is built against Qt 6 on conda-forge, into a Qt 5
RViz plugin: "INTERFACE_QT_MAJOR_VERSION of Qt6::OpenGL does not agree
with QT_MAJOR_VERSION" (tried locally, with rtabmap built without Qt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rtabmap_util asks for find_package(RTABMap COMPONENTS gui), but none of its
sources use the GUI, and humble's rtabmap is built without Qt (see the
exclusions of rtabmap_viz and rtabmap_rviz_plugins).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As on humble: the plugin links PCL, whose VTK is Qt 6 on conda-forge,
into jazzy's Qt 5 RViz, and CMake refuses the mix (INTERFACE_QT_MAJOR_VERSION
of Qt6::OpenGL). Unlike humble, jazzy's rtabmap_viz builds and links only
Qt 6 (rtabmap's own), so it stays. Found by a linux-64 build on top of
the jazzy sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turns the local checks of this PR into a recipe test, so later rebuilds keep them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer

Copy link
Copy Markdown
Collaborator Author

Human Tobi: looks good to go once the sync PRs are in

Tobias-Fischer and others added 2 commits October 25, 2026 07:26
Export all symbols of the rtabmap_ros libraries on Windows (their
visibility headers are unused, nothing is dllexported otherwise).
Recipe test on Windows: the rtabmap executable is installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer Tobias-Fischer added build:humble PR build: build only humble (with other build:<distro> labels: only those) build:jazzy PR build: build only jazzy (with other build:<distro> labels: only those) build:lyrical PR build: build only lyrical (with other build:<distro> labels: only those) labels Oct 24, 2026
Tobias-Fischer and others added 7 commits October 25, 2026 07:31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… visibility headers check

They define RTABMAP_ROS_BUILDING_LIBRARY, but visibility.h only dllexports
with RTABMAP_<PKG>_BUILDING_DLL, so on Windows the plugin class was
dllimport inside its own DLL (LNK2019 on the constructor).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exporting every symbol of rtabmap_sync exceeds the 65535-object limit of
an import library (LNK1189): dllexport CommonDataSubscriber via its
visibility macro instead, and export all of rtabmap_sync_plugins only.
rtabmap_viz has no library, so it needs no exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ath and NOMINMAX

rtabmap::core links some PCL libraries by bare name (pcl_visualization,
pcl_keypoints; RTABMapConfig.cmake defines no imported target for them),
so LINK could not find them (LNK1181): add %LIBRARY_LIB% to the link path.
NOMINMAX for Eigen's Parallelizer next to windows.h (C2589), and
std::array::data() instead of begin() for memcpy in db_player (C2664).
The Windows-only cmake args no longer touch the other platforms.
humble needs its own copy of the .win.patch next to its ros2-rtabmap-util.patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ticStatus::ERROR

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…scan: _USE_MATH_DEFINES on Windows

velodyne_laserscan comes in on Windows through rtabmap_examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer Tobias-Fischer added the build:win PR build: only the win platforms (remove for a full build before merging) label Oct 24, 2026
Tobias-Fischer and others added 3 commits October 25, 2026 10:05
Its shared library exports no symbols, so MSVC writes no import library and
velodyne_laserscan_node failed to link (LNK1181: cannot open input file
'Release\velodyne_laserscan.lib').

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
velodyne_driver reads the sensor over POSIX sockets (netinet/in.h, C1083) and
needs libpcap, so velodyne, velodyne_driver and velodyne_pointcloud are left
out on Windows (packages_exclude also drops them from rtabmap_examples, which
only uses them for its Velodyne launch files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer Tobias-Fischer added build:rolling PR build: build only rolling (with other build:<distro> labels: only those) and removed build:win PR build: only the win platforms (remove for a full build before merging) labels Oct 25, 2026
@Tobias-Fischer Tobias-Fischer changed the title Add rtabmap_ros (not on Windows) Add rtabmap_ros Oct 25, 2026
@Tobias-Fischer
Tobias-Fischer marked this pull request as ready for review October 25, 2026 07:37
@Tobias-Fischer
Tobias-Fischer merged commit b28d25f into main Oct 25, 2026
30 checks passed
@Tobias-Fischer
Tobias-Fischer deleted the ports/rtabmap-ros branch October 25, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:humble PR build: build only humble (with other build:<distro> labels: only those) build:jazzy PR build: build only jazzy (with other build:<distro> labels: only those) build:lyrical PR build: build only lyrical (with other build:<distro> labels: only those) build:rolling PR build: build only rolling (with other build:<distro> labels: only those)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant