From dfcb30c1daeb88b15596454ad1f73abb3e526afd Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Tue, 17 Jan 2023 11:24:58 +0200 Subject: [PATCH] Fix result string --- src/axidraw_controller/src/cpp/axidraw_controller.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/axidraw_controller/src/cpp/axidraw_controller.cpp b/src/axidraw_controller/src/cpp/axidraw_controller.cpp index ec9fa17..16374db 100644 --- a/src/axidraw_controller/src/cpp/axidraw_controller.cpp +++ b/src/axidraw_controller/src/cpp/axidraw_controller.cpp @@ -57,8 +57,9 @@ class AxidrawController : public RobotController auto result = status_client->async_send_request(request); result.wait(); - RCLCPP_INFO(this->get_logger(), "Called is_ready(), status: %s", result.get()->status.c_str()); - return result.get()->status == "waiting"; + std::string res_string = result.get()->status; + RCLCPP_INFO(this->get_logger(), "Called is_ready(), status: %s", res_string.c_str()); + return res_string == "waiting"; } // Set limits for A4 paper: 297x210mm