diff --git a/shared/patch/ros2-beluga.patch b/shared/patch/ros2-beluga.patch new file mode 100644 index 00000000..450ae6c7 --- /dev/null +++ b/shared/patch/ros2-beluga.patch @@ -0,0 +1,53 @@ +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..5cb6d95 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 +@@ -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. 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