From a198796544ae0865423ac354cb7db71ffda61979 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 09:59:08 +0100 Subject: [PATCH] Update gazebo_ros2_control_plugin.cpp (#286) (#288) (cherry picked from commit 5e1f9a52bcd1bf4164186dbb3c8b5cf070ed156e) Co-authored-by: Tobias Fischer --- gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp b/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp index 71084a3d..c77293fe 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" @@ -476,7 +478,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...");