Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions patch/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ pcl_conversions:
add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libboost-devel"]
pcl_ros:
add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libboost-devel"]
easynav_bonxai_maps_manager:
# robostack-jazzy's already-published pcl_ros requires the newer eigen-abi
# package (>=5.0.1.80); pin eigen-abi-devel so this package resolves it too.
add_host: ["eigen-abi-devel"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strange, eigen-abi-devel should already end up in host thanks to the eigen's package.xml dep of easynav_bonxai_maps_manager, see https://github.com/RoboStack/ros-jazzy/blob/main/robostack.yaml#L83-L84 . I guess this is necessary only we are trying to package easynav_boxmai_maps_manager 0.4.0 here, while 0.4.2 has the right fix (i.e. EasyNavigation/easynav_plugins@0b95273)?

Can we add a comment here writing that we can drop this once easynav_bonxai_maps_manager is updated to the version 0.4.2 ?

easynav_octomap_maps_manager:
# "octomap" isn't auto-resolved from rosdep for this package (same gap as
# geometric_shapes below); without it CMake fails to find octomapConfig.cmake.
add_host: ["octomap"]
add_run: ["octomap"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to https://github.com/RoboStack/ros-jazzy/pull/260/changes#r3773763070, this is actully fixed in 0.4.2 by adding the correct dep key in package.xml, can we add a comment saying that this can be dropped once we have easynav_octomap_maps_manager ?

rviz_rendering:
add_host: ["glew"]
behaviortree_cpp:
Expand Down
54 changes: 54 additions & 0 deletions patch/ros-jazzy-navmap-ros.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f6c3f0..4b2c4d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,27 @@
cmake_minimum_required(VERSION 3.10)
project(navmap_ros)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
+
+# Avoid leaking system Eigen (e.g. /usr/include/eigen3) into exported include
+# directories through PCL.
+set(_eigen_prefix "")
+if(DEFINED ENV{PREFIX})
+ set(_eigen_prefix "$ENV{PREFIX}")
+elseif(DEFINED ENV{CONDA_PREFIX})
+ set(_eigen_prefix "$ENV{CONDA_PREFIX}")
+endif()
+if(_eigen_prefix)
+ set(Eigen3_DIR "${_eigen_prefix}/share/eigen3/cmake" CACHE PATH "" FORCE)
+ set(EIGEN3_INCLUDE_DIR "${_eigen_prefix}/include/eigen3" CACHE PATH "" FORCE)
+ set(EIGEN3_INCLUDE_DIRS "${_eigen_prefix}/include/eigen3" CACHE PATH "" FORCE)
+endif()
+find_package(Eigen3 CONFIG QUIET)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -15,7 +36,18 @@ find_package(navmap_ros_interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(PCL REQUIRED COMPONENTS common io kdtree search)
+
+# PCLConfig.cmake may inject system Eigen include paths; filter them out to
+# prevent mixing system Eigen with the conda/pixi Eigen.
Comment on lines +37 to +38

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this comment. conda-forge's PCL build should never leak any system eigen3, unless there is something wrong somewhere. Can you please report the error you get if this patch is not here?

if(PCL_INCLUDE_DIRS)
# Be permissive: the entry may have a trailing slash or whitespace depending
# on how PCL was configured.
list(FILTER PCL_INCLUDE_DIRS EXCLUDE REGEX "/usr/include/eigen3")
endif()
Comment on lines +39 to +43
+if(EIGEN3_INCLUDE_DIRS AND PCL_INCLUDE_DIRS)
+ list(FIND PCL_INCLUDE_DIRS "${EIGEN3_INCLUDE_DIRS}" _eigen_idx)
+ if(_eigen_idx EQUAL -1)
+ list(APPEND PCL_INCLUDE_DIRS "${EIGEN3_INCLUDE_DIRS}")
+ endif()
+endif()
+
find_package(pcl_conversions REQUIRED)

add_library(${PROJECT_NAME} SHARED
src/${PROJECT_NAME}/conversions.cpp
Loading
Loading