Repository navigation
Add MOLA on MRPT 3 - #117
Merged
Merged
Conversation
mola_launcher, mp2p_icp_core/viz and mola_metric_maps find_package(CLI11) for their command-line tools; the key was unmapped, so the dependency was dropped and configure failed. gz_utils_vendor and ros_gz_sim also declare it and pick it up now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mrpt_common calls find_package(ament_cmake) when ROS_VERSION=2, but its package.xml (build_type cmake) does not declare it. - mrpt_gui links libwx_*; the wxwidgets/wx-common keys map to wxpython, so wxwidgets was only a transitive host dependency and its (weak) run_exports never reached the run requirements (libmrpt_gui.so and libmola_viz.so then failed to load). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
find_file() for the fonts in 3rdparty/nanogui/resources is re-rooted under CMAKE_FIND_ROOT_PATH by the conda toolchain flags, so the source tree files are never found. Search them with NO_CMAKE_FIND_ROOT_PATH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The static vendor library's GLFW/OpenGL3 backends call dlopen()/dlsym(), which live in libdl on the glibc 2.28 sysroot; mp2p_icp_viz's mm-viewer failed to link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mola-cli only searches MOLA_MODULES_LIB_PATH and LD_LIBRARY_PATH for module libraries; neither is set in a conda/pixi environment, so no module was ever loaded. Also search <prefix>/lib for each AMENT_PREFIX_PATH entry, and skip *__rosidl_* libraries (mola_msgs), which are never modules and whose Python ones cannot be dlopen()ed from a non-Python process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requested in #106. On lyrical this is MOLA 3.3.0 on MRPT 3 (mrpt3-release 3.3.1) and mp2p_icp 3.0.0 (mp2p_icp_core/mp2p_icp_viz), all released in the snapshot. Co-authored-by: Wolf Vollprecht <885054+wolfv@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grid::operator=(Grid&&) move-assigns a Bonxai::Mask, which has const members and so no assignment operator. GCC never instantiates the operator, clang rejects it at definition. Re-construct the mask in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MRPT turns MRPT_WITH_NANOGUI off by default on Apple, which drops CDisplayWindowGUI; mola_viz requires it unconditionally. nanogui builds against GLFW and OpenGL.framework there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- load_plugin(): use dlopen() on Apple too (it only did under __unix__, so macOS fell into the Windows LoadLibrary() branch), map the usual "lib<name>.so" plugin names to .dylib there, and also search <prefix>/lib for each AMENT_PREFIX_PATH entry (conda environments do not set LD_LIBRARY_PATH). - Serialize std::size_t values as uint64_t: MRPT's CArchive only accepts fixed-width integers and size_t is unsigned long, not uint64_t, on macOS. No change on Linux, where the two are the same type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libcfgpath calls FSFindFolder()/FSRefMakePath() on Apple; mm-viewer and icp-log-viewer failed to link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MolaDLL_Loader only used dlopen() under __unix__, which Apple clang does not define, so macOS took the Windows LoadLibrary() branch. Use dlopen() on Apple too and look for .dylib modules there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The whole MOLA / MRPT 3 / mp2p_icp tree builds on osx-arm64 with the previous fixes, and mola-cli loads all modules. Windows not tried yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…5.15 These distributions map Qt to qt-main 5.15, whose builds need gstreamer <1.27 on Linux, while the pinned wxwidgets 3.3.3 needs gstreamer 1.28, so mrpt_gui's host environment (shared: add_host wxwidgets) could not be solved. A version spec bypasses the variant pin: on linux-64 the solver now takes wxwidgets 3.2.8.1 (with wxpython 4.2.4, which the wx rosdep keys map to), and its run_exports still reach the run requirements. lyrical and rolling (qt6-main) keep the shared entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…used [skip ci] showErrorMessage() only uses wx when Qt is not available, but the file includes WxUtils.h whenever wx is found. With Qt 5 (jazzy, humble) on macOS, the wx and Qt headers clash: "typedef 'NSData' cannot be referenced with the 'struct' specifier". No change on Linux or with Qt 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…skip ci] 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>
Collaborator
Author
|
Human Tobi: looks good to go once the sync PRs are in |
Select mola on every platform; mola_launcher searches <prefix>/bin (where Windows DLLs are) of each AMENT_PREFIX_PATH entry on Windows, and the mola-cli recipe test runs on Windows as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its exported targets carry the eigen include directory there, so mola_traj_tools (no eigen host dependency of its own) failed to configure. Evict mrpt_math from the PR cache so it is rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Include windows.h, report GetLastError() instead of dlerror(), and cast the stored handle back to HMODULE for FreeLibrary(). Reset evict_cache: the mrpt_math rebuild has happened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mola_launcher: return fs::path::string() (no implicit conversion with MSVC's wchar_t paths). - mp2p_icp_core: load plugins with LoadLibraryA (windows.h, GetLastError()), map "lib<name>.so" to "<name>.dll", search <prefix>/bin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without exports MSVC writes no import library and its test executable cannot link (LNK1181). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mola_bridge_ros2 includes windows.h (via rclcpp) before mola_kernel's DiagnosticsProvider.h, whose DiagnosticLevel::ERROR then fails to parse. Evict mola_kernel from the PR cache so it is rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MOLA_NARG/VFUNC passed __VA_ARGS__ on as a single argument with MSVC, so YAML_LOAD_OPT(...) in mola_bridge_ros2 did not resolve. Rescan through an expansion macro. Evict mola_yaml from the PR cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BridgeROS2.cpp exceeds the object file section limit (C1128). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release source has no 3rdparty/ with MRPT's bundled static GLEW, so opengl_api.h failed with 'Cannot open include file: GL/glew.h' (C1083). Use conda-forge's GLEW (a DLL, so without GLEW_STATIC) and leave out the bundled glext.h, which glew.h covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exported targets (mrpt_opengl-targets.cmake) listed GLEW::GLEW, which mrpt_gui's find_package(mrpt_opengl) didn't define. Linked privately like MRPT's bundled GLEW; ci.yaml evicts the cached mrpt_opengl (reset before merging). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e comment) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
windows.h comes without commdlg.h here (WIN32_LEAN_AND_MEAN), so nanogui's file dialog failed: 'OPENFILENAMEW': undeclared identifier (C2065). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ROS build scripts set NOGDI (CL=/DNOGDI=1), which keeps GDI's types out of
windows.h; commdlg.h, for nanogui's file dialog, needs them ('lpLogFont':
unknown override specifier, C3646).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its wxWidgets sources need GDI too (glcanvas.h's PIXELFORMATDESCRIPTOR), not only nanogui's file dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nanogui/opengl.h includes glad/glad.h when NANOGUI_GLAD is set (the Windows default), but only the GLFW and nanovg headers were installed, so mola_viz failed with C1083. ci.yaml: evict mrpt_gui instead of the already rebuilt packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mola_viz links VizInterface::BACKEND_NANOGUI, a static data member that CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS doesn't export (LNK2019). C++17 inline variables need no exported symbol. ci.yaml: evict mola_kernel instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like mrpt_opengl: the release source has no bundled GLEW, so CImGuiSceneView's framebuffer calls (__glewBindFramebuffer, ...) were unresolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r on Windows - mrpt_imgui: CImGuiSceneView.h calls GL extension functions inline, so mp2p_icp_viz failed to link __glewBindFramebuffer: GLEW is now in its link interface (the import library by path once installed). - mola_metric_maps: MSVC requires capturing the constexpr local used in voxelKey()'s lambda (C3493); static needs no capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The keyframe map test uses POSIX setenv()/unsetenv() (and a constexpr local MSVC requires capturing). ci.yaml: evictions reset (rebuilt). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mrpt_tfest failed on osx-64: its se2_l2.SSE2.cpp gets -msse2, and clang rejects the target's precompiled header, built without it. GCC doesn't check this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ABI check (linux-64)About this checkEach package this pull request built, compared with its newest released build (
Exported symbols are compared (the released packages are stripped, so struct layouts aren't); unchanged installed headers rule out layout and inline changes, changed ones are listed for review. Dependents to rebuild are the released ones linking to a changed library. A changed pin is part of the comparison. |
Tobias-Fischer
marked this pull request as ready for review
October 25, 2026 10:36
…ncy everywhere - nanogui (in mrpt_gui) links conda-forge's glad DLL on Windows instead of compiling its bundled glad; its users link glad.lib through mrpt_gui's interface. The install of the bundled glad headers is gone. - mrpt_math run-depends on eigen on every platform: its public headers include Eigen, and eigen-abi-devel's run_exports only add eigen-abi. ci.yaml: evict mrpt_math, mrpt_gui and the packages built against mrpt_gui's glad (mola_viz, mp2p_icp_viz); reset before merging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tobias-Fischer
enabled auto-merge (squash)
October 25, 2026 11:01
Tobias-Fischer
disabled auto-merge
October 25, 2026 11:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #106, porting RoboStack/ros-lyrical#30 by @wolfv: adds
molato the shared selection, on all platforms. MOLA 3.x now builds on MRPT 3 (mrpt3-release:mrpt_core,mrpt_math, …) andmp2p_icp3.0 is split intomp2p_icp_core/mp2p_icp_viz, so the old PR's MRPT 2 workarounds aren't used. Everything is released in the rosdistros (MOLA 3.3.x and MRPT 3 for humble, jazzy, lyrical and rolling), so no additional recipes.One commit per fix:
cli11rosdep key → conda-forgecli11(was unmapped:mola_launcher,mp2p_icp_core/_viz,mola_metric_mapscouldn't find CLI11). Side effect:gz_utils_vendorandros_gz_simalso getcli11in their recipes, so they rebuild.mrpt_common: host-depends onament_cmake(its CMakeLists uses it with ROS_VERSION=2, its package.xml doesn't declare it);mrpt_gui: host-depends onwxwidgets(thewxwidgets/wx-commonkeys map towxpythononly, solibmrpt_gui.solackedlibwx_baseu-3.3.soat runtime).mrpt_gui:NO_CMAKE_FIND_ROOT_PATHfor the bundled nanogui fonts (conda's find-root settings hid them).mrpt_imgui_vendor: links${CMAKE_DL_LIBS}publicly (dlopenis in libdl on the glibc 2.28 sysroot).mola_launcher: also looks for modules in<prefix>/libof eachAMENT_PREFIX_PATHentry (a conda environment sets neitherMOLA_MODULES_LIB_PATHnorLD_LIBRARY_PATH, so it found 0 modules), and skips*__rosidl_*libraries, which are never modules (loading the Python type support one crashed). The only patch that changes upstream behaviour.molametapackage doesn't pull inmola_lidar_odometry/mola_state_estimation*; they can be added if wanted.macOS (osx-arm64 trial):
mrpt_maps: the bundled BonxaiGridmove assignment re-constructs itsMask(const members): clang instantiates it and rejects the implicitly deleted assignment, GCC never instantiates it.mrpt_gui: also builds the bundled nanogui on macOS (upstream defaults it off on Apple, which removesCDisplayWindowGUIthatmola_vizneeds).mp2p_icp_core:dlopenandlib<name>.dylibon__APPLE__(macOS took the WindowsLoadLibrarybranch, as Apple clang doesn't define__unix__), plugin search in eachAMENT_PREFIX_PATH'sliblikemola_launcher, andsize_tvalues serialized asuint64_t(MRPT'sCArchiveonly takes fixed-width integers;size_tisunsigned longbutuint64_tisunsigned long longon macOS; the same type on Linux).mp2p_icp_viz: linksCoreServiceson Apple (libcfgpathusesFSFindFolder).mola_launcher:dlopen/.dylibmodules on__APPLE__, asmp2p_icp_core.Windows:
3rdparty/), somrpt_openglandmrpt_imguilink conda-forge'sglew(a DLL: noGLEW_STATIC);mrpt_imgui's header calls GL extension functions inline, so its users get GLEW too (glew32.libby path in the installed targets).mrpt_gui: re-enables GDI (/UNOGDI: the ROS build scripts setNOGDIfor every package, but wxWidgets' and nanogui's GUI code need it),<commdlg.h>for nanogui's file dialog, and installs nanogui's bundled glad headers (itsopengl.hincludes them on Windows, upstream only installs the GLFW and nanovg headers).mrpt_math: run-depends oneigenon Windows (its exported targets carry the Eigen include path).mrpt_libros_bridgeexports all symbols.mola_kernel:#undef ERROR(wingdi.h) beforeDiagnosticLevel::ERROR;VizInterface's backend names as inline variables (static data members aren't exported by export-all, somola_vizfailed to link).mola_launcherandmp2p_icp_core: modules and plugins load withLoadLibrary(<name>.dll, searched in each prefix'sbin);mola-cliusessignal()and_write().mola_yaml: an extra macro expansion for MSVC's traditional preprocessor (__VA_ARGS__);mola_bridge_ros2:/bigobj;mola_metric_maps:static constexprfor a lambda (C3493), and its tests aren't built (POSIXsetenv()).Qt 5 distributions (jazzy, humble):
mrpt_gui:add_host: wxwidgets >=3.2indistros/{jazzy,humble}/patch/dependencies.yaml, overriding the sharedwxwidgets. These distributions map Qt toqt-main5.15, whose builds need gstreamer <1.27 on Linux, while the pinned wxwidgets 3.3.3 needs gstreamer 1.28, so the host environment couldn't be solved. With a version spec the pin doesn't apply, and on linux-64 the solver takes wxwidgets 3.2.8.1 (gstreamer 1.26); its run_exports still reach the run requirements.mrpt_gui:error_box.cppincludes the wx headers only without Qt (its wx code is only used then). With Qt 5 on macOS, the wx and Qt headers clash (typedef 'NSData' cannot be referenced with the 'struct' specifier). No change on Linux or with Qt 6.Recipe test on the
molametapackage:mola-cli --rtti-list-alllistsMolaViz,BridgeROS2,Rosbag2DatasetandKeyframePointCloudMap, i.e. the launcher finds the module libraries without any environment variable (shared/tests/ros2-mola.yaml).Built locally
molaclosure (ROS core, 31mrpt_*, 17mola_*,mp2p_icp*), with their recipe tests. Smoke test in a fresh environment:mola-cli --help,icp-run --help,mm-info --help,mola-yaml-parser --helpwork;lddfinds every library;mola-cli --list-modulesloads 12 modules (BridgeROS2,MolaViz,Rosbag2Dataset,KeyframePointCloudMap, …) without any environment variable set;import mrpt_msgs.msg,from mrpt import poses,import mola_msgs.srvwork. That was before the macOS commits; those change Linux only by the extraAMENT_PREFIX_PATHplugin search inmp2p_icp_core(the__APPLE__branches andsize_t→uint64_tare the same code there), and a Linux rebuild with them is still to do.mola-cli --list-modulesloads the module libraries (bridge_ros2, theinput_*modules,metric_maps,relocalization,viz;mola_kernel/launcher/yamlare linked directly),--rtti-list-allshows the same 13mola::classes as on Linux, the Python imports work, andotool -Lshows only@rpath/system libraries. Not run: opening a window (nanogui on macOS isn't tested upstream), SLAM on a dataset.mola-cli --list-modulesloads 9 module libraries as on lyrical,--rtti-list-allshows the 13mola::classes,libmrpt_gui.dyliblinkslibwx_baseu-3.3andlibQt5Widgets, andmrpt_msgs,mola_msgs.srvandmrpt.guiimport.molaclosure with recipe tests, on top of the jazzy sync and the other ports (a build host with a GPU and some system-devpackages, worked around locally).mrpt_gui's host environment solves as predicted (qt-main 5.15.15, gstreamer 1.26.11, wxwidgets 3.2.8.1). Smoke test in a fresh environment:mola-cli --list-moduleslists the module libraries,--rtti-list-allshows the 13mola::classes,import mrpt_msgs.msg, mola_msgs.srvandfrom mrpt import poseswork, andlibmrpt_gui.soresolveslibwx_baseu-3.2andlibQt5Widgets.molaclosure (MOLA 3.3.1, MRPT 3.5.0) with recipe tests; smoke test as on jazzy: 9 module libraries, the 13mola::classes, the Python imports;libmrpt_guilinks wxWidgets 3.3 and Qt 5.molaclosure (MOLA 3.3.2, MRPT 3.5.2) with recipe tests; the same smoke test passes (libmrpt_guilinks wxWidgets 3.3, no Qt).molaclosure with recipe tests; smoke test: the module libraries are found, 13mola::classes, Python imports;libmrpt_gui.soresolves wxWidgets 3.2 and Qt 5.molaclosure with recipe tests, incl. the newmola-cli --rtti-list-alltest.CI (run): green on humble, jazzy, lyrical and rolling, all platforms. osx-64 needed
mrpt_commonto compile the*.SSE2.cpp-style sources without the precompiled header (clang rejects a PCH built without-msse2;shared/patch/ros2-mrpt-common.patch). The syncs it was prepared on are merged.🤖 Generated with Claude Code