Skip to content

Commit

Permalink
Merge branch 'main' into traversaro-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer committed Feb 14, 2024
2 parents 5f65a30 + 70a0e0f commit 131e60d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions patch/ros-humble-gazebo-ros2-control.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
@@ -30,6 +30,7 @@ link_directories(
add_library(${PROJECT_NAME} SHARED
src/gazebo_ros2_control_plugin.cpp
)
+target_compile_definitions(${PROJECT_NAME} PRIVATE "_USE_MATH_DEFINES" "NO_STRICT")
ament_target_dependencies(${PROJECT_NAME}
angles
controller_manager
@@ -44,6 +45,7 @@ ament_target_dependencies(${PROJECT_NAME}
add_library(gazebo_hardware_plugins SHARED
src/gazebo_system.cpp
)
+target_compile_definitions(gazebo_hardware_plugins PRIVATE "_USE_MATH_DEFINES" "NO_STRICT")
ament_target_dependencies(gazebo_hardware_plugins
angles
gazebo_dev

0 comments on commit 131e60d

Please sign in to comment.