Skip to content

Commit

Permalink
Use portable versio for usleep (#237)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
(cherry picked from commit 0bdf13e)
  • Loading branch information
ahcorde authored and mergify[bot] committed Feb 14, 2024
1 parent 9710133 commit c3b7ff3
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 c3b7ff3

Please sign in to comment.