diff --git a/patch/dependencies.yaml b/patch/dependencies.yaml index d712cde..46032df 100644 --- a/patch/dependencies.yaml +++ b/patch/dependencies.yaml @@ -73,8 +73,6 @@ tvm_vendor: add_host: ["libblas", "openblas", "libcblas"] libphidget22: add_host: ["libusb"] -libg2o: - add_host: ["qt", "libglu", "freeglut"] fmilibrary_vendor: add_host: ["fmilib"] mrpt2: @@ -87,7 +85,7 @@ ros1_rosbag_storage_vendor: popf: add_host: ["perl"] rtabmap: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "ceres-solver", "libdc1394", "libusb", "vtk"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "ceres-solver", "libboost-devel", "${{ 'libdc1394' if not win }}", "libusb", "vtk"] backward_ros: add_host: ["${{ 'binutils' if linux }}", "${{ 'elfutils' if linux }}", "ros-lyrical-ament-cmake-libraries"] nav2_smac_planner: diff --git a/patch/ros-lyrical-rtabmap.patch b/patch/ros-lyrical-rtabmap.patch new file mode 100644 index 0000000..e73249f --- /dev/null +++ b/patch/ros-lyrical-rtabmap.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7d36de..44e1164 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -530,8 +530,12 @@ IF(WITH_G2O) + ENDIF(WITH_G2O) + + IF(WITH_GTSAM) +- # Force config mode to ignore PCL's findGTSAM.cmake file ++ # GTSAM's config searches for Eigen. Prefer Eigen's config so RTAB-Map's ++ # legacy FindEigen3 module does not try to parse Eigen 5 headers. ++ SET(_RTABMAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG ${CMAKE_FIND_PACKAGE_PREFER_CONFIG}) ++ SET(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) + FIND_PACKAGE(GTSAM CONFIG QUIET) ++ SET(CMAKE_FIND_PACKAGE_PREFER_CONFIG ${_RTABMAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG}) + ENDIF(WITH_GTSAM) + + IF(WITH_MRPT) +@@ -578,7 +582,7 @@ ENDIF(WITH_POINTMATCHER) + IF(libpointmatcher_FOUND OR GTSAM_FOUND) +- find_package(Boost COMPONENTS thread filesystem system program_options date_time REQUIRED) ++ find_package(Boost COMPONENTS thread filesystem program_options date_time REQUIRED) + IF(Boost_MINOR_VERSION GREATER 47) +- find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono timer serialization REQUIRED) ++ find_package(Boost COMPONENTS thread filesystem program_options date_time chrono timer serialization REQUIRED) + ENDIF(Boost_MINOR_VERSION GREATER 47) + IF(WIN32) + MESSAGE(STATUS "Boost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}") +@@ -112,5 +116,9 @@ if(MSVC) + endif() + endif() + add_compile_options("/bigobj") ++ # GUI entry points use CoInitialize(). Force the COM declarations while ++ # ensuring the modern Winsock header precedes windows.h in every source. ++ add_compile_options("/FIwinsock2.h") ++ add_compile_options("/FIobjbase.h") + endif() + + # Detect CPU arch and whether we are in 32 or 64 bit +diff --git a/corelib/src/CMakeLists.txt b/corelib/src/CMakeLists.txt +index b758ad0..3f29cba 100644 +--- a/corelib/src/CMakeLists.txt ++++ b/corelib/src/CMakeLists.txt +@@ -855,0 +856,6 @@ ADD_LIBRARY(rtabmap::core ALIAS rtabmap_core) ++# GTSAM and this target both instantiate an identical inline TBB allocator ++# vector accessor on MSVC. Let the linker coalesce that duplicate definition. ++IF(MSVC) ++ TARGET_LINK_OPTIONS(rtabmap_core PRIVATE "/FORCE:MULTIPLE") ++ENDIF(MSVC) ++ diff --git a/pkg_additional_info.yaml b/pkg_additional_info.yaml index 3c110ba..886bd8a 100644 --- a/pkg_additional_info.yaml +++ b/pkg_additional_info.yaml @@ -133,6 +133,8 @@ pybind11_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR" robot_state_publisher: additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" +libg2o: + additional_cmake_args: "-DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF -DG2O_USE_OPENGL=OFF -DBUILD_LGPL_SHARED_LIBS=ON" rosx_introspection: additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" rviz_ogre_vendor: diff --git a/vinca.yaml b/vinca.yaml index 44ca52d..cdabe32 100644 --- a/vinca.yaml +++ b/vinca.yaml @@ -126,6 +126,7 @@ packages_select_by_deps: - rmw_zenoh_cpp # requested in https://github.com/RoboStack/ros-humble/issues/252 - robot - robot-localization + - rtabmap - ros2_control - ros2_controllers - ros2_fmt_logger