From 7db58f80e96fef5217b701cbd3dc64868f31f8a6 Mon Sep 17 00:00:00 2001 From: Jelmer de Wolde Date: Wed, 16 Oct 2024 03:54:24 +0200 Subject: [PATCH] Obtain time from node. (#3032) Signed-off-by: Jelmer de Wolde --- moveit_ros/moveit_servo/src/servo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moveit_ros/moveit_servo/src/servo.cpp b/moveit_ros/moveit_servo/src/servo.cpp index 329e4a84a8..c62488660f 100644 --- a/moveit_ros/moveit_servo/src/servo.cpp +++ b/moveit_ros/moveit_servo/src/servo.cpp @@ -648,8 +648,8 @@ KinematicState Servo::getCurrentRobotState(bool block_for_current_state) const bool have_current_state = false; while (rclcpp::ok() && !have_current_state) { - have_current_state = planning_scene_monitor_->getStateMonitor()->waitForCurrentState( - rclcpp::Clock(RCL_ROS_TIME).now(), ROBOT_STATE_WAIT_TIME /* s */); + have_current_state = + planning_scene_monitor_->getStateMonitor()->waitForCurrentState(node_->now(), ROBOT_STATE_WAIT_TIME /* s */); if (!have_current_state) { RCLCPP_WARN(logger_, "Waiting for the current state");