From 84ea285f27abd5ac61524e366b6b0fa1faeca4d8 Mon Sep 17 00:00:00 2001 From: Sanjeev Kumar Date: Sat, 21 Dec 2024 20:56:10 +0100 Subject: [PATCH] Fix: deprecation from realtime_tools --- controller_manager/src/ros2_control_node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp index d6a0b0f3dd..60a4b1d83b 100644 --- a/controller_manager/src/ros2_control_node.cpp +++ b/controller_manager/src/ros2_control_node.cpp @@ -58,8 +58,8 @@ int main(int argc, char ** argv) } const bool has_realtime = realtime_tools::has_realtime_kernel(); const bool lock_memory = cm->get_parameter_or("lock_memory", has_realtime); - std::string message; - if (lock_memory && !realtime_tools::lock_memory(message)) + auto [success, message] = realtime_tools::lock_memory(); + if (lock_memory && !success) { RCLCPP_WARN(cm->get_logger(), "Unable to lock the memory : '%s'", message.c_str()); }