diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 818b9aa99..98ab77f68 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -34,6 +34,15 @@ jobs: - os: windows-2019 platform: osx-arm64 steps: + # Workaround for https://github.com/RoboStack/ros-humble/pull/141#issuecomment-1941919816 + - name: Clean up PATH + if: contains(matrix.os, 'windows') + uses: egor-tensin/cleanup-path@v4 + with: + # cygpath in C:\Program Files\Git\usr\bin is used by install micromamba + # 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' + - uses: actions/checkout@master - name: install micromamba uses: mamba-org/setup-micromamba@main @@ -78,11 +87,6 @@ jobs: run: | rm -rf /c/Strawberry - # Workaround for https://github.com/RoboStack/ros-humble/pull/141#issuecomment-1941919816 - - name: Clean up PATH - if: contains(matrix.os, 'windows') - uses: egor-tensin/cleanup-path@v4 - - name: Check what files have changed id: filecheck shell: bash -l {0} diff --git a/.scripts/build_win.bat b/.scripts/build_win.bat index a264ee628..a0c28bd8f 100644 --- a/.scripts/build_win.bat +++ b/.scripts/build_win.bat @@ -2,22 +2,6 @@ setlocal EnableExtensions EnableDelayedExpansion call %CONDA%\condabin\conda_hook.bat call %CONDA%\condabin\conda.bat activate base -set "PATH=%PATH:C:\ProgramData\Chocolatey\bin;=%" -set "PATH=%PATH:C:\Program Files (x86)\sbt\bin;=%" -set "PATH=%PATH:C:\Rust\.cargo\bin;=%" -set "PATH=%PATH:C:\Program Files\Git\usr\bin;=%" -set "PATH=%PATH:C:\Program Files\Git\cmd;=%" -set "PATH=%PATH:C:\Program Files\Git\mingw64\bin;=%" -set "PATH=%PATH:C:\Program Files (x86)\Subversion\bin;=%" -set "PATH=%PATH:C:\Program Files\CMake\bin;=%" -set "PATH=%PATH:C:\Program Files\OpenSSL\bin;=%" -set "PATH=%PATH:C:\Strawberry\c\bin;=%" -set "PATH=%PATH:C:\Strawberry\perl\bin;=%" -set "PATH=%PATH:C:\Strawberry\perl\site\bin;=%" -set "PATH=%PATH:c:\tools\php;=%" -:: Make paths like C:\\hostedtoolcache\\windows\\Ruby\\2.5.7\\x64\\bin garbage -set "PATH=%PATH:ostedtoolcache=%" - echo "PATH is %PATH%" echo "CONDA_BLD_PATH is %CONDA_BLD_PATH%" diff --git a/patch/ros-humble-gazebo-ros2-control.patch b/patch/ros-humble-gazebo-ros2-control.patch index e5a048caf..10cf5af11 100644 --- a/patch/ros-humble-gazebo-ros2-control.patch +++ b/patch/ros-humble-gazebo-ros2-control.patch @@ -1,29 +1,7 @@ -diff --git a/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp b/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp -index 1ed72fc..6015669 100644 ---- a/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp -+++ b/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp -@@ -36,6 +36,8 @@ - #include - #include - #include -+#include -+#include - - #include "gazebo_ros/node.hpp" - -@@ -506,7 +508,7 @@ std::string GazeboRosControlPrivate::getURDF(std::string param_name) const - model_nh_->get_logger(), "gazebo_ros2_control plugin is waiting for model" - " URDF in parameter [%s] on the ROS param server.", param_name.c_str()); - } -- usleep(100000); -+ std::this_thread::sleep_for(std::chrono::microseconds(100000)); - } - RCLCPP_INFO( - model_nh_->get_logger(), "Received urdf from param server, parsing..."); -diff --git a/gazebo_ros2_control/CMakeLists.txt b/gazebo_ros2_control/CMakeLists.txt -index cfba129..b954ccc 100644 ---- a/gazebo_ros2_control/CMakeLists.txt -+++ b/gazebo_ros2_control/CMakeLists.txt +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cfba129..d91c6a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt @@ -30,6 +30,7 @@ link_directories( add_library(${PROJECT_NAME} SHARED src/gazebo_ros2_control_plugin.cpp @@ -40,3 +18,25 @@ index cfba129..b954ccc 100644 ament_target_dependencies(gazebo_hardware_plugins angles gazebo_dev +diff --git a/src/gazebo_ros2_control_plugin.cpp b/src/gazebo_ros2_control_plugin.cpp +index 82b7ba7..eee85e6 100644 +--- a/src/gazebo_ros2_control_plugin.cpp ++++ b/src/gazebo_ros2_control_plugin.cpp +@@ -36,6 +36,8 @@ + #include + #include + #include ++#include ++#include + + #include "gazebo_ros/node.hpp" + +@@ -465,7 +471,7 @@ std::string GazeboRosControlPrivate::getURDF(std::string param_name) const + model_nh_->get_logger(), "gazebo_ros2_control plugin is waiting for model" + " URDF in parameter [%s] on the ROS param server.", search_param_name.c_str()); + } +- usleep(100000); ++ std::this_thread::sleep_for(std::chrono::microseconds(100000)); + } + RCLCPP_INFO( + model_nh_->get_logger(), "Received urdf from param server, parsing..."); diff --git a/patch/ros-humble-hardware-interface.patch b/patch/ros-humble-hardware-interface.patch index e60ae176a..bfed7f303 100644 --- a/patch/ros-humble-hardware-interface.patch +++ b/patch/ros-humble-hardware-interface.patch @@ -22,3 +22,18 @@ index 846d9f757c..042361e392 100644 bool parse_bool(const std::string & bool_string); } // namespace hardware_interface +diff --git a/hardware_interface/include/hardware_interface/types/hardware_interface_return_values.hpp b/hardware_interface/include/hardware_interface/types/hardware_interface_return_values.hpp +index 5c3ea22ca0..271dc29faf 100644 +--- a/hardware_interface/include/hardware_interface/types/hardware_interface_return_values.hpp ++++ b/hardware_interface/include/hardware_interface/types/hardware_interface_return_values.hpp +@@ -17,6 +17,10 @@ + + #include + ++#ifdef ERROR ++#undef ERROR ++#endif ++ + namespace hardware_interface + { + enum class return_type : std::uint8_t diff --git a/vinca_win.yaml b/vinca_win.yaml index 21302261f..75c41cbbb 100644 --- a/vinca_win.yaml +++ b/vinca_win.yaml @@ -62,5 +62,6 @@ packages_select_by_deps: # - desktop_full # - moveit + patch_dir: patch