From 9047a35b57c2affde5eaa1f59613ae8761e957f4 Mon Sep 17 00:00:00 2001 From: Sudip Roy Date: Mon, 23 Dec 2024 18:47:40 +0530 Subject: [PATCH] fix pre-commit --- controller_manager/src/ros2_control_node.cpp | 5 +++-- diff.txt | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 diff.txt diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp index f2079f80d8..75a98d19dd 100644 --- a/controller_manager/src/ros2_control_node.cpp +++ b/controller_manager/src/ros2_control_node.cpp @@ -61,10 +61,11 @@ 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); - if (lock_memory) + if (lock_memory) { const auto lock_result = realtime_tools::lock_memory(); - if (!lock_result.first) { + if (!lock_result.first) + { RCLCPP_WARN(cm->get_logger(), "Unable to lock the memory: '%s'", lock_result.second.c_str()); } } diff --git a/diff.txt b/diff.txt new file mode 100644 index 0000000000..cf8c132ffc --- /dev/null +++ b/diff.txt @@ -0,0 +1,18 @@ +diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp +index f2079f80..75a98d19 100644 +--- a/controller_manager/src/ros2_control_node.cpp ++++ b/controller_manager/src/ros2_control_node.cpp +@@ -61,10 +61,11 @@ 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); +- if (lock_memory) ++ if (lock_memory) + { + const auto lock_result = realtime_tools::lock_memory(); +- if (!lock_result.first) { ++ if (!lock_result.first) ++ { + RCLCPP_WARN(cm->get_logger(), "Unable to lock the memory: '%s'", lock_result.second.c_str()); + } + }