diff --git a/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp b/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp index 1df14965..a20ae0e3 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.", 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...");