From 332e4f030b39260c30159c3113eb1907a6a091ab Mon Sep 17 00:00:00 2001 From: Jihye Sofia Seo <9078892+jihyeseo@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:05:33 +0100 Subject: [PATCH] Fix a typo in Writing-A-Simple-Cpp-Service-And-Client.rst (#4934) Signed-off-by: Jihye Sofia Seo <9078892+jihyeseo@users.noreply.github.com> (cherry picked from commit 3959d21c85453d4133089dcf793f903987339006) # Conflicts: # source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Service-And-Client.rst --- .../Writing-A-Simple-Cpp-Service-And-Client.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Service-And-Client.rst b/source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Service-And-Client.rst index 96475d2b385..cee4c65ef65 100644 --- a/source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Service-And-Client.rst +++ b/source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Service-And-Client.rst @@ -208,6 +208,7 @@ Inside the ``ros2_ws/src/cpp_srvcli/src`` directory, create a new file called `` RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "usage: add_two_ints_client X Y"); return 1; } +<<<<<<< HEAD std::shared_ptr node = rclcpp::Node::make_shared("add_two_ints_client"); rclcpp::Client::SharedPtr client = @@ -228,6 +229,13 @@ Inside the ``ros2_ws/src/cpp_srvcli/src`` directory, create a new file called `` auto result = client->async_send_request(request); // Wait for the result. if (rclcpp::spin_until_future_complete(node, result) == +======= + auto request = std::make_shared(); + request->a = 41; + request->b = 1; + auto result_future = client->async_send_request(request); + if (rclcpp::spin_until_future_complete(node, result_future) != +>>>>>>> 3959d21 (Fix a typo in Writing-A-Simple-Cpp-Service-And-Client.rst (#4934)) rclcpp::FutureReturnCode::SUCCESS) { RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "Sum: %ld", result.get()->sum);