Skip to content
Merged
15 changes: 15 additions & 0 deletions distros/jazzy/patch/ros2-fuse-models.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe3bc94..aadac7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,10 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
+if(MSVC)
+ # error C1128: number of sections exceeded object file format limit
+ add_compile_options(/bigobj)
+endif()

find_package(ament_cmake_ros REQUIRED)

29 changes: 29 additions & 0 deletions distros/lyrical/patch/ros2-fuse-viz.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a24db7..540d97e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,13 +23,13 @@ find_package(tf2_geometry_msgs REQUIRED)

find_package(Eigen3 REQUIRED)
find_package(gtest_vendor)
-find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
+find_package(Qt6 COMPONENTS Core Widgets REQUIRED)

###########
## Build ##
###########

-qt5_wrap_cpp(moc_files
+qt6_wrap_cpp(moc_files
include/fuse_viz/mapped_covariance_property.hpp
include/fuse_viz/pose_2d_stamped_property.hpp
include/fuse_viz/relative_pose_2d_stamped_constraint_property.hpp
@@ -61,7 +61,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
- ${Qt5Widgets_INCLUDE_DIRS}
+ ${Qt6Widgets_INCLUDE_DIRS}
)

#############
29 changes: 29 additions & 0 deletions distros/rolling/patch/ros2-fuse-viz.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a24db7..540d97e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,13 +23,13 @@ find_package(tf2_geometry_msgs REQUIRED)

find_package(Eigen3 REQUIRED)
find_package(gtest_vendor)
-find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
+find_package(Qt6 COMPONENTS Core Widgets REQUIRED)

###########
## Build ##
###########

-qt5_wrap_cpp(moc_files
+qt6_wrap_cpp(moc_files
include/fuse_viz/mapped_covariance_property.hpp
include/fuse_viz/pose_2d_stamped_property.hpp
include/fuse_viz/relative_pose_2d_stamped_constraint_property.hpp
@@ -61,7 +61,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
- ${Qt5Widgets_INCLUDE_DIRS}
+ ${Qt6Widgets_INCLUDE_DIRS}
)

#############
13 changes: 13 additions & 0 deletions shared/patch/ros2-fuse-constraints.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8640fe0..55d6a47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,7 @@ include(suitesparse-extras.cmake)
# | ^~~
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
add_compile_options(-Wall -Werror -Wno-array-bounds)
-else()
+elseif(NOT MSVC)
add_compile_options(-Wall -Werror)
endif()

15 changes: 15 additions & 0 deletions shared/patch/ros2-fuse-core.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 737542c..9a68b92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,10 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
target_link_libraries(${PROJECT_NAME} PRIVATE
rclcpp_components::component
)
+# MSVC: M_PI (used in fuse_core/util.hpp) needs _USE_MATH_DEFINES, also in dependent packages
+if(MSVC)
+ target_compile_definitions(${PROJECT_NAME} PUBLIC _USE_MATH_DEFINES)
+endif()

## fuse_echo executable
add_library(fuse_echo_component SHARED src/fuse_echo.cpp)
17 changes: 17 additions & 0 deletions shared/patch/ros2-fuse-graphs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a0bc4d..d07dce2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,7 +44,11 @@ include(boost-extras.cmake)
# /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/std_function.h:267:7: note: by argument 2 of type ‘const std::_Any_data&’ to ‘static bool std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Res = const fuse_core::Variable&; _Functor = fuse_graphs::HashGraph::getVariables() const::<lambda(const std::unordered_map<boost::uuids::uuid, std::shared_ptr<fuse_core::Variable>, boost::hash<boost::uuids::uuid> >::value_type&)>; _ArgTypes = {const std::pair<const boost::uuids::uuid, std::shared_ptr<fuse_core::Variable> >&}]’ declared here
# 267 | _M_manager(_Any_data& __dest, const _Any_data& __source,
# | ^~~~~~~~~~
-add_compile_options(-Wall -Werror -Wno-maybe-uninitialized)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ add_compile_options(-Wall -Werror -Wno-maybe-uninitialized)
+elseif(NOT MSVC)
+ add_compile_options(-Wall -Werror)
+endif()

## fuse_graphs library
add_library(${PROJECT_NAME}
22 changes: 22 additions & 0 deletions shared/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@ force_torque_sensor_broadcaster:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
foxglove_bridge:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_constraints:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_core:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_graphs:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_loss:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_models: # Windows: imu_2d.cpp has more sections than an object file can hold without /bigobj (C1128)
additional_cmake_args:
if: win
then: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DCMAKE_CXX_FLAGS_INIT=/bigobj"
fuse_optimizers:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_publishers:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_tutorials:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_variables:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
fuse_viz:
additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
gz_cmake_vendor:
additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK"
gz_common_vendor:
Expand Down
4 changes: 4 additions & 0 deletions shared/tests/ros2-fuse-optimizers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests:
# Smoke test: `fuse_optimizers/fixed_lag_smoother_node` (fuse's optimizer node) starts (loads its libraries and the RMW) and is still running after 5 s. It's stopped (killed if SIGTERM doesn't end it) before the test exits, or the test runner waits for it.
- script:
- python -c "import os, subprocess, sys, time; d = os.path.join(os.environ['PREFIX'], 'Library') if os.name == 'nt' else os.environ['PREFIX']; p = subprocess.Popen([os.path.join(d, 'lib', 'fuse_optimizers', 'fixed_lag_smoother_node')]); time.sleep(5); r = p.poll(); p.terminate(); time.sleep(3); p.kill(); p.wait(); sys.exit(0 if r is None else 1)"
1 change: 1 addition & 0 deletions shared/vinca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ packages_select_by_deps:
- flex_sync
- foxglove_bridge
- foxglove_msgs
- fuse # requested in https://github.com/RoboStack/ros-lyrical/pull/85
- gazebo_dev
- gazebo_msgs
- gazebo_plugins
Expand Down
Loading