From fb80c4d4a5180a876a821291ecc9ef83dfa59c72 Mon Sep 17 00:00:00 2001 From: Griffin Tabor Date: Wed, 21 Oct 2026 10:10:25 -0400 Subject: [PATCH] Beluga to windows as well --- shared/patch/ros2-beluga-amcl.win.patch | 12 ++++++++++++ shared/patch/ros2-beluga-ros.win.patch | 18 ++++++++++++++++++ shared/patch/ros2-beluga.patch | 13 +++++++++++++ shared/vinca.yaml | 7 +++++-- 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 shared/patch/ros2-beluga-amcl.win.patch create mode 100644 shared/patch/ros2-beluga-ros.win.patch diff --git a/shared/patch/ros2-beluga-amcl.win.patch b/shared/patch/ros2-beluga-amcl.win.patch new file mode 100644 index 000000000..abb9a980b --- /dev/null +++ b/shared/patch/ros2-beluga-amcl.win.patch @@ -0,0 +1,12 @@ +diff --git a/beluga_amcl/CMakeLists.txt b/beluga_amcl/CMakeLists.txt +index 85d042e..dafb64f 100644 +--- a/beluga_amcl/CMakeLists.txt ++++ b/beluga_amcl/CMakeLists.txt +@@ -71,6 +71,7 @@ if(NOT PARANOID) + endif() + endforeach() + endif() ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + add_library(beluga_amcl_ros2_common SHARED) + target_sources(beluga_amcl_ros2_common PRIVATE src/ros2_common.cpp) \ No newline at end of file diff --git a/shared/patch/ros2-beluga-ros.win.patch b/shared/patch/ros2-beluga-ros.win.patch new file mode 100644 index 000000000..f8afab613 --- /dev/null +++ b/shared/patch/ros2-beluga-ros.win.patch @@ -0,0 +1,18 @@ +diff --git a/beluga_ros/CMakeLists.txt b/beluga_ros/CMakeLists.txt +index 212972e..8395c83 100644 +--- a/beluga_ros/CMakeLists.txt ++++ b/beluga_ros/CMakeLists.txt +@@ -73,7 +73,12 @@ if(NOT PARANOID) + endforeach() + endif() + +-add_library(beluga_ros) ++if(WIN32) ++ add_library(beluga_ros STATIC) ++else() ++ add_library(beluga_ros) ++endif() ++ + target_sources(beluga_ros PRIVATE src/amcl.cpp src/ndt_ellipsoid.cpp) + target_include_directories( + beluga_ros PUBLIC $ \ No newline at end of file diff --git a/shared/patch/ros2-beluga.patch b/shared/patch/ros2-beluga.patch index 450ae6c7f..779429568 100644 --- a/shared/patch/ros2-beluga.patch +++ b/shared/patch/ros2-beluga.patch @@ -51,3 +51,16 @@ index 9d7ad43..5cb6d95 100644 }; /// Implementation detail for the on_motion_fn object. +diff --git a/include/beluga/sensor/ndt_sensor_model.hpp b/include/beluga/sensor/ndt_sensor_model.hpp +index 21d4d6f..35aff49 100644 +--- a/include/beluga/sensor/ndt_sensor_model.hpp ++++ b/include/beluga/sensor/ndt_sensor_model.hpp +@@ -271,7 +271,7 @@ NDTMapRepresentationT load_from_hdf5(const std::filesystem::path& path_to_hdf5_f + throw std::invalid_argument(ss.str()); + } + +- const H5::H5File file(path_to_hdf5_file, H5F_ACC_RDONLY); ++ const H5::H5File file(path_to_hdf5_file.string(), H5F_ACC_RDONLY); + const H5::DataSet means_dataset = file.openDataSet("means"); + const H5::DataSet covariances_dataset = file.openDataSet("covariances"); + const H5::DataSet resolution_dataset = file.openDataSet("resolution"); \ No newline at end of file diff --git a/shared/vinca.yaml b/shared/vinca.yaml index 958eb328a..d244c5823 100644 --- a/shared/vinca.yaml +++ b/shared/vinca.yaml @@ -395,8 +395,6 @@ packages_select_by_deps: - apex_containers - apriltag_ros # These packages are currently only build on Linux,; as trying to build them in the past on macos or Windows resulted in errors - avt_vimba_camera # ships some Linux .so in the repo, so it only supports linux - - beluga_amcl # macOS: libc++ lacks std::execution::sequenced_policy; requested in https://github.com/RoboStack/ros-jazzy/pull/298 - - beluga_ros # macOS: libc++ lacks std::execution::sequenced_policy; requested in https://github.com/RoboStack/ros-jazzy/pull/298 - camera_ros # Depends on libcamera that is only available on linux; Depends on libcamera, only available on linux - can_dbc_parser - easynav @@ -513,6 +511,11 @@ packages_select_by_deps: - v4l2_camera - yaets + - if: not osx + then: + - beluga_amcl # macOS: libc++ lacks std::execution::sequenced_policy; requested in https://github.com/RoboStack/ros-jazzy/pull/298 + - beluga_ros # macOS: libc++ lacks std::execution::sequenced_policy; requested in https://github.com/RoboStack/ros-jazzy/pull/298 + - if: linux and not aarch64 then: - franka_ros2 # Franka robots support; see PR #338 for macOS/Windows errors