diff --git a/gz_ros2_control/src/gz_ros2_control_plugin.cpp b/gz_ros2_control/src/gz_ros2_control_plugin.cpp index 54913710..48d1896b 100644 --- a/gz_ros2_control/src/gz_ros2_control_plugin.cpp +++ b/gz_ros2_control/src/gz_ros2_control_plugin.cpp @@ -14,9 +14,11 @@ #include +#include #include #include #include +#include #include #include @@ -231,7 +233,7 @@ std::string GazeboSimROS2ControlPluginPrivate::getURDF() const " URDF in parameter [%s] on the ROS param server.", this->robot_description_.c_str()); } - usleep(100000); + std::this_thread::sleep_for(std::chrono::microseconds(100000)); } RCLCPP_INFO(node_->get_logger(), "Received URDF from param server");