From a6b32b60cf47ce268d44e00dfb25b48f74221827 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 14 Feb 2024 10:39:21 +1000 Subject: [PATCH] Update gazebo_ros2_control_plugin.cpp --- 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 1ed72fcb..6015669a 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...");