From 770d59c4a27f4cf3b3f27a223b94c96e59783b39 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 19 Oct 2026 09:18:33 +1000 Subject: [PATCH 1/2] Add beluga_amcl and beluga_ros (Linux) [skip ci] Ports RoboStack/ros-jazzy#298 and #267. Beluga 2.1.1 is released for humble and jazzy, and conda-forge's sophus works (Eigen 5), so no additional recipes or dummy package are needed. The beluga patch includes instead of an Eigen-internal header (rejected by Eigen 5) and defaults BUILD_TESTING to OFF (its tests hit a GCC 15 constexpr std::optional error). macOS: libc++ lacks std::execution::sequenced_policy. Co-authored-by: Griffin Tabor <14334346+gftabor@users.noreply.github.com> Co-authored-by: Tim Clephas <5036851+Timple@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- shared/patch/ros2-beluga.patch | 26 ++++++++++++++++++++++++++ shared/vinca.yaml | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 shared/patch/ros2-beluga.patch diff --git a/shared/patch/ros2-beluga.patch b/shared/patch/ros2-beluga.patch new file mode 100644 index 00000000..95a2971f --- /dev/null +++ b/shared/patch/ros2-beluga.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c08a64..b94a7f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,7 +94,7 @@ target_sources(clang_tidy_findable PRIVATE src/clang_tidy_findable.cpp) + target_link_libraries(clang_tidy_findable PRIVATE ${PROJECT_NAME} + beluga_compile_options) + +-option(BUILD_TESTING "Build the testing tree." ON) ++option(BUILD_TESTING "Build the testing tree." OFF) + if(BUILD_TESTING) + message(STATUS "Build testing enabled.") + enable_testing() +diff --git a/include/beluga/policies/on_motion.hpp b/include/beluga/policies/on_motion.hpp +index 9d7ad43..eb7a21f 100644 +--- a/include/beluga/policies/on_motion.hpp ++++ b/include/beluga/policies/on_motion.hpp +@@ -15,7 +15,7 @@ + #ifndef BELUGA_POLICIES_ON_MOTION_HPP + #define BELUGA_POLICIES_ON_MOTION_HPP + +-#include ++#include + #include + #include + #include diff --git a/shared/vinca.yaml b/shared/vinca.yaml index c93bc085..958eb328 100644 --- a/shared/vinca.yaml +++ b/shared/vinca.yaml @@ -395,6 +395,8 @@ 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 From c6455dfa8710c860bda826019e39afbdaf08b617 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 19 Oct 2026 11:42:07 +1000 Subject: [PATCH 2/2] beluga: no std::optional in the on_motion policy [skip ci] GCC 15 fails to instantiate std::optional (union storage "initializations for multiple members"), which beluga_amcl's NDT 3D node hits through the on_motion policy, not only the tests. Store the latest pose as a flag plus the pose instead; same behaviour. Co-Authored-By: Claude Opus 5.5 --- shared/patch/ros2-beluga.patch | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/shared/patch/ros2-beluga.patch b/shared/patch/ros2-beluga.patch index 95a2971f..450ae6c7 100644 --- a/shared/patch/ros2-beluga.patch +++ b/shared/patch/ros2-beluga.patch @@ -12,7 +12,7 @@ index 5c08a64..b94a7f1 100644 message(STATUS "Build testing enabled.") enable_testing() diff --git a/include/beluga/policies/on_motion.hpp b/include/beluga/policies/on_motion.hpp -index 9d7ad43..eb7a21f 100644 +index 9d7ad43..5cb6d95 100644 --- a/include/beluga/policies/on_motion.hpp +++ b/include/beluga/policies/on_motion.hpp @@ -15,7 +15,7 @@ @@ -24,3 +24,30 @@ index 9d7ad43..eb7a21f 100644 #include #include #include +@@ -119,12 +119,13 @@ struct on_motion_policy : public on_motion_policy_base { + + /// Return true if motion has been detected. + constexpr bool operator()(const Pose& pose) { +- if (!latest_pose_) { ++ if (!has_latest_pose_) { + latest_pose_ = pose; ++ has_latest_pose_ = true; + return true; + } + +- const bool moved = (*this)(*latest_pose_, pose); ++ const bool moved = (*this)(latest_pose_, pose); + if (moved) { + latest_pose_ = pose; + } +@@ -133,7 +134,9 @@ struct on_motion_policy : public on_motion_policy_base { + } + + private: +- std::optional latest_pose_; ///< The latest pose for motion comparison. ++ // a flag instead of std::optional: GCC 15 fails to instantiate std::optional ++ bool has_latest_pose_{false}; ///< Whether latest_pose_ holds a pose. ++ Pose latest_pose_{}; ///< The latest pose for motion comparison. + }; + + /// Implementation detail for the on_motion_fn object.