Skip to content

Commit

Permalink
Use portable versio for usleep (#237) (#239)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
(cherry picked from commit 0bdf13e)

Co-authored-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
mergify[bot] and ahcorde authored Feb 14, 2024
1 parent 9710133 commit 700be8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gz_ros2_control/src/gz_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

#include <unistd.h>

#include <chrono>
#include <map>
#include <memory>
#include <string>
#include <thread>
#include <utility>
#include <vector>

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

Expand Down

0 comments on commit 700be8e

Please sign in to comment.