Skip to content

Commit

Permalink
Use portable versio for usleep (backport #237) (#238)
Browse files Browse the repository at this point in the history
* Use portable versio for usleep (#237)

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
(cherry picked from commit 0bdf13e)

# Conflicts:
#	ign_ros2_control/src/ign_ros2_control_plugin.cpp

* fixed merge

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

---------

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
mergify[bot] and ahcorde authored Feb 14, 2024
1 parent fba9b83 commit 1aa0f75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ign_ros2_control/src/ign_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <unistd.h>

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

Expand Down Expand Up @@ -219,7 +223,7 @@ std::string IgnitionROS2ControlPluginPrivate::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 1aa0f75

Please sign in to comment.