diff --git a/moveit_ros/moveit_servo/src/servo.cpp b/moveit_ros/moveit_servo/src/servo.cpp index 329e4a84a88..c62488660f1 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");