Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use portable version for usleep (backport #286) #287

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include <memory>
#include <utility>
#include <vector>
#include <chrono>
#include <thread>

#include "gazebo_ros/node.hpp"

Expand Down Expand Up @@ -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...");
Expand Down