Skip to content

Commit

Permalink
Use portable versio for usleep
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Feb 14, 2024
1 parent a3beadb commit 272d00b
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 272d00b

Please sign in to comment.