-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into traversaro-patch-1
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |