Skip to content

Commit

Permalink
Merge pull request #143 from RoboStack/traversaro-patch-1
Browse files Browse the repository at this point in the history
Fix Windows build follow up and enable more Windows packages
  • Loading branch information
Tobias-Fischer authored Feb 15, 2024
2 parents 70a0e0f + b2d4bcf commit b82bc56
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 47 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/testpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
16 changes: 0 additions & 16 deletions .scripts/build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%"

Expand Down
52 changes: 26 additions & 26 deletions patch/ros-humble-gazebo-ros2-control.patch
Original file line number Diff line number Diff line change
@@ -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 <memory>
#include <utility>
#include <vector>
+#include <chrono>
+#include <thread>

#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
Expand All @@ -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 <memory>
#include <utility>
#include <vector>
+#include <chrono>
+#include <thread>

#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...");
15 changes: 15 additions & 0 deletions patch/ros-humble-hardware-interface.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cstdint>

+#ifdef ERROR
+#undef ERROR
+#endif
+
namespace hardware_interface
{
enum class return_type : std::uint8_t
1 change: 1 addition & 0 deletions vinca_win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ packages_select_by_deps:
# - desktop_full
# - moveit


patch_dir: patch

0 comments on commit b82bc56

Please sign in to comment.