ros2_rust
ros2_rust copied to clipboard
Wait for service
This PR adds a function(wait_for_service) in client to wait for service to be up .
@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 , 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.
After https://github.com/ros2-rust/ros2_rust/pull/249 is merged, this could be redone using guard conditions.