Skip to content

Commit

Permalink
Merge pull request #16 from RoboStack/featureparitywin
Browse files Browse the repository at this point in the history
Enable more packages on Windows
  • Loading branch information
Tobias-Fischer authored Jan 21, 2025
2 parents 7546ddd + b872426 commit da20595
Show file tree
Hide file tree
Showing 62 changed files with 1,688 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install vinca
run: |
pip install git+https://github.com/RoboStack/vinca.git@rattler-build-humble
pip install git+https://github.com/RoboStack/vinca.git
- name: Generate recipes for linux-64
run: |
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/testpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
include:
- os: ubuntu-latest
platform: linux-64
- os: cirun-linux-aarch64--${{ github.run_id }}
- os: ubuntu-24.04-arm
platform: linux-aarch64
- os: macos-13
platform: osx-64
Expand Down Expand Up @@ -45,22 +45,6 @@ jobs:
# git in C:\Program Files\Git\bin is used by pip install git+
dirs: 'C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin'

# - shell: bash -l {0}
# if: matrix.platform == 'linux-aarch64'
# run: |
# echo "::group::Configure binfmt_misc"
# docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
# export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)"
# export GIT_BRANCH="$(basename $GITHUB_REF)"
# echo "::endgroup::"

- name: Install libgl1-mesa-dev (only for linux-aarch64)
if: matrix.platform == 'linux-aarch64'
shell: bash -l {0}
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxi-dev libxmu-dev
# For some reason, the Strawberry perl's pkg-config is found
# instead of the conda's one, so let's delete the /c/Strawberry directory
# Furthermore, we also need to remove an older SDK that is used and can result in compilation problems
Expand Down
42 changes: 26 additions & 16 deletions conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,38 @@ protobuf:
- 5.28.2
spdlog:
- 1.14
pugixml:
- '1.14'

cdt_name:
- ${{ "cos7" if linux }}
cdt_name: # [linux]
- conda # [linux]

python:
- 3.11.* *_cpython
python_impl:
- cpython

c_stdlib:
- ${{ "sysroot" if linux }}
- ${{ "macosx_deployment_target" if osx }}
- ${{ "vs" if win }}
c_stdlib_version:
- ${{ "2.17" if linux }}
- ${{ "10.14" if osx and x86_64 }}
- ${{ "11.0" if osx and arm64 }}
c_compiler:
- ${{ "gcc" if linux }}
- ${{ "clang" if osx }}
- ${{ "vs2019" if win }}
- gcc # [linux]
- clang # [osx]
- vs2019 # [win and x86_64]
- vs2022 # [win and arm64]
c_compiler_version: # [unix]
- 13 # [linux]
- 18 # [osx]
c_stdlib:
- sysroot # [linux]
- macosx_deployment_target # [osx]
- vs # [win]
c_stdlib_version: # [unix]
- 2.17 # [linux]
- 10.13 # [osx and x86_64]
- 11.0 # [osx and arm64]
cxx_compiler:
- ${{ "gxx" if linux }}
- ${{ "clangxx" if osx }}
- ${{ "vs2019" if win }}
- gxx # [linux]
- clangxx # [osx]
- vs2019 # [win and x86_64]
- vs2022 # [win and arm64]
cxx_compiler_version: # [unix]
- 13 # [linux]
- 18 # [osx]
2 changes: 1 addition & 1 deletion env/robostackenv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ dependencies:
- rattler-build
- pip
- pip:
- git+https://github.com/RoboStack/vinca.git@rattler-build-humble
- git+https://github.com/RoboStack/vinca.git
6 changes: 3 additions & 3 deletions patch/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ pcl_ros:
add_host: ["REQUIRE_OPENGL", "libboost-devel"]
rviz_rendering:
add_host: ["glew"]
behaviortree_cpp_v3:
add_host: ["libboost-devel", "cppzmq"]
behaviortree_cpp:
add_host: ["libboost-devel", "cppzmq", "zeromq", "sqlite"]
add_run: ["libboost"]
plotjuggler:
add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros-jazzy-ros-workspace"]
Expand Down Expand Up @@ -157,7 +157,7 @@ rqt_image_overlay:
add_host: ["REQUIRE_OPENGL"]
slam_toolbox:
add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"]
add_host: ["REQUIRE_OPENGL"]
add_host: ["REQUIRE_OPENGL", "blas-devel"]
vision_msgs_rviz_plugins:
add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"]
add_host: ["REQUIRE_OPENGL"]
Expand Down
11 changes: 11 additions & 0 deletions patch/ros-jazzy-angles.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f909972..5b6b6e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,3 +19,6 @@ find_package(ament_cmake REQUIRED)
+if(WIN32)
+ target_compile_definitions(angles INTERFACE _USE_MATH_DEFINES)
+endif()

if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
24 changes: 24 additions & 0 deletions patch/ros-jazzy-behaviortree-cpp.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/cmake/ament_build.cmake b/cmake/ament_build.cmake
index 55c3011b2..152268032 100644
--- a/cmake/ament_build.cmake
+++ b/cmake/ament_build.cmake
@@ -10,7 +10,10 @@ if(BTCPP_SQLITE_LOGGING)
find_package(SQLite3 REQUIRED)
endif()

-find_package(ament_index_cpp REQUIRED)
+find_package(ament_index_cpp REQUIRED)
+
+set(BTCPP_EXTRA_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIRS}
+ ${SQLite3_INCLUDE_DIRS})

set( BTCPP_EXTRA_LIBRARIES
$<BUILD_INTERFACE:ament_index_cpp::ament_index_cpp>
@@ -26,6 +29,7 @@ set( BTCPP_BIN_DESTINATION bin )

mark_as_advanced(
BTCPP_EXTRA_LIBRARIES
+ BTCPP_EXTRA_INCLUDE_DIRS
BTCPP_LIB_DESTINATION
BTCPP_INCLUDE_DESTINATION
BTCPP_BIN_DESTINATION )
32 changes: 32 additions & 0 deletions patch/ros-jazzy-control-toolbox.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 791d063ea62837e86831b7b4dda48b22e680d8cc Mon Sep 17 00:00:00 2001
From: Christoph Froehlich <[email protected]>
Date: Mon, 25 Nov 2024 20:11:09 +0000
Subject: [PATCH] Export symbols on windows

---
CMakeLists.txt | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc1f551..30f4bad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,16 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
endif()

if(WIN32)
- # Enable Math Constants
- # https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=vs-2019
add_compile_definitions(
+ # For math constants
+ # https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=vs-2019
_USE_MATH_DEFINES
+ # Minimize Windows namespace collision
+ NOMINMAX
+ WIN32_LEAN_AND_MEAN
)
+ # set the same behavior for windows as it is on linux
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
9 changes: 9 additions & 0 deletions patch/ros-jazzy-diagnostic-aggregator.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff --git a/diagnostic_aggregator/CMakeLists.txt b/diagnostic_aggregator/CMakeLists.txt
index 6014edf3..bbcee116 100644
--- a/diagnostic_aggregator/CMakeLists.txt
+++ b/diagnostic_aggregator/CMakeLists.txt
@@ -6,3 +6,4 @@ endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

find_package(ament_cmake REQUIRED)
find_package(diagnostic_msgs REQUIRED)
9 changes: 9 additions & 0 deletions patch/ros-jazzy-diagnostic-updater.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff --git a/diagnostic_updater/CMakeLists.txt b/diagnostic_updater/CMakeLists.txt
index eafa9891..9199df0d 100644
--- a/diagnostic_updater/CMakeLists.txt
+++ b/diagnostic_updater/CMakeLists.txt
@@ -6,3 +6,4 @@ endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_ros REQUIRED)
9 changes: 9 additions & 0 deletions patch/ros-jazzy-filters.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32b9f9f..587d5ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,3 +12,4 @@ endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

##############################################################################
# Find dependencies
22 changes: 22 additions & 0 deletions patch/ros-jazzy-forward-command-controller.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/forward_command_controller/CMakeLists.txt b/forward_command_controller/CMakeLists.txt
index bf027866d6..f7610c5f85 100644
--- a/forward_command_controller/CMakeLists.txt
+++ b/forward_command_controller/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
-project(forward_command_controller LANGUAGES CXX)
+project(forward_command_controller)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
@@ -7,6 +7,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
-Werror=missing-braces)
endif()

+# using this instead of visibility macros
+# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
set(THIS_PACKAGE_INCLUDE_DEPENDS
controller_interface
generate_parameter_library
16 changes: 16 additions & 0 deletions patch/ros-jazzy-gripper-controllers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/gripper_controllers/CMakeLists.txt b/gripper_controllers/CMakeLists.txt
index 4ffdc76168..05174402d0 100644
--- a/gripper_controllers/CMakeLists.txt
+++ b/gripper_controllers/CMakeLists.txt
@@ -1,11 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(gripper_controllers)

-if(APPLE OR WIN32)
- message(WARNING "gripper controllers are not available on OSX or Windows")
- return()
-endif()
-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
File renamed without changes.
8 changes: 8 additions & 0 deletions patch/ros-jazzy-hardware-interface.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt
index b4e0f6cab0..50120726bb 100644
--- a/hardware_interface/CMakeLists.txt
+++ b/hardware_interface/CMakeLists.txt
@@ -57,3 +57,4 @@ target_include_directories(mock_components PUBLIC
+target_link_libraries(mock_components PUBLIC hardware_interface)
ament_target_dependencies(mock_components PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})

13 changes: 13 additions & 0 deletions patch/ros-jazzy-image-proc.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 4570eb7..54bfe64 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,8 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
25 changes: 25 additions & 0 deletions patch/ros-jazzy-image-publisher.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb41c81..88460ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(image_publisher)

+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)

diff --git a/src/image_publisher.cpp b/src/image_publisher.cpp
index 667e7209c..2f75459c1 100644
--- a/src/image_publisher.cpp
+++ b/src/image_publisher.cpp
@@ -34,3 +34,6 @@
+#ifndef _USE_MATH_DEFINES
+#define _USE_MATH_DEFINES
+#endif
#include <cmath>
#include <chrono>
#include <limits>
13 changes: 13 additions & 0 deletions patch/ros-jazzy-image-rotate.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 49c3b94..8445833 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,8 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

+add_compile_definitions(_USE_MATH_DEFINES)
+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
13 changes: 13 additions & 0 deletions patch/ros-jazzy-image-view.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 27231ef..0b0246f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,8 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
12 changes: 12 additions & 0 deletions patch/ros-jazzy-io-context.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/io_context/CMakeLists.txt b/io_context/CMakeLists.txt
index 54804aa..3c04653 100644
--- a/io_context/CMakeLists.txt
+++ b/io_context/CMakeLists.txt
@@ -25,6 +25,7 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

## dependencies
find_package(ament_cmake_auto REQUIRED)
12 changes: 12 additions & 0 deletions patch/ros-jazzy-joint-limits-skip.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/joint_limits/src/joint_soft_limiter.cpp b/joint_limits/src/joint_soft_limiter.cpp
index a2292cb033..622a320384 100644
--- a/joint_limits/src/joint_soft_limiter.cpp
+++ b/joint_limits/src/joint_soft_limiter.cpp
@@ -13,6 +13,7 @@
// limitations under the License.

/// \author Adrià Roig Moreno
+#define _USE_MATH_DEFINES
#include "joint_limits/joint_soft_limiter.hpp"

namespace joint_limits
18 changes: 18 additions & 0 deletions patch/ros-jazzy-joint-state-broadcaster.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp b/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp
index f1c532dce9..9eb7ab8a13 100644
--- a/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp
+++ b/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp
@@ -88,9 +88,13 @@ class JointStateBroadcaster : public controller_interface::ControllerInterface
const rclcpp_lifecycle::State & previous_state) override;

protected:
+ JOINT_STATE_BROADCASTER_PUBLIC
bool init_joint_data();
+ JOINT_STATE_BROADCASTER_PUBLIC
void init_joint_state_msg();
+ JOINT_STATE_BROADCASTER_PUBLIC
void init_dynamic_joint_state_msg();
+ JOINT_STATE_BROADCASTER_PUBLIC
bool use_all_available_interfaces() const;

protected:
11 changes: 11 additions & 0 deletions patch/ros-jazzy-laser-filters.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bb5bfd..b9f334b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,1 +23,6 @@ ament_auto_add_library(laser_scan_filters SHARED src/laser_scan_filters.cpp)
+find_package(Boost REQUIRED COMPONENTS thread)
+target_link_libraries(laser_scan_filters Boost::thread)
+set_target_properties(laser_scan_filters PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
+set_target_properties(laser_filter_chains PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)

Loading

0 comments on commit da20595

Please sign in to comment.