ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Wait for service

Open i-am-chauhan opened this issue 3 years ago • 3 comments

This PR adds a function(wait_for_service) in client to wait for service to be up .

i-am-chauhan avatar Jul 05 '22 15:07 i-am-chauhan

@i-am-chauhan thanks! This is great, however I'd prefer not to use thread::sleep in the library (for examples that should be fine). The way rclcpp solves this is by using guard conditions and the ROS graph (https://github.com/ros2/rclcpp/blob/rolling/rclcpp/src/rclcpp/client.cpp#L169-L170), which are currently not implemented in rclrs

esteve avatar Jul 06 '22 13:07 esteve

@esteve , okay I was taking rclpy as reference which does the same what I have done. I'll see if I can do it as rclcpp.

i-am-chauhan avatar Jul 07 '22 03:07 i-am-chauhan

After https://github.com/ros2-rust/ros2_rust/pull/249 is merged, this could be redone using guard conditions.

nnmm avatar Aug 21 '22 14:08 nnmm