From 7d74f2e68c134c6075ae0dfedeb70257b5f3ff2d Mon Sep 17 00:00:00 2001 From: Manuel Muth Date: Thu, 22 Aug 2024 11:05:06 +0200 Subject: [PATCH 1/2] inform user what reason is for not setting rt policy, inform is policy (#1705) (cherry picked from commit dd352eb45a9a983116f61dc1a5fc650003844cf3) # Conflicts: # controller_manager/src/ros2_control_node.cpp --- controller_manager/src/ros2_control_node.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp index e7f88f2c20..81a21962cb 100644 --- a/controller_manager/src/ros2_control_node.cpp +++ b/controller_manager/src/ros2_control_node.cpp @@ -12,7 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +<<<<<<< HEAD #include +======= +#include +>>>>>>> dd352eb (inform user what reason is for not setting rt policy, inform is policy (#1705)) #include #include #include @@ -50,6 +54,7 @@ int main(int argc, char ** argv) { if (realtime_tools::has_realtime_kernel()) { +<<<<<<< HEAD if (!realtime_tools::configure_sched_fifo(kSchedPriority)) { RCLCPP_WARN(cm->get_logger(), "Could not enable FIFO RT scheduling policy"); @@ -58,6 +63,20 @@ int main(int argc, char ** argv) else { RCLCPP_INFO(cm->get_logger(), "RT kernel is recommended for better performance"); +======= + RCLCPP_WARN( + cm->get_logger(), + "Could not enable FIFO RT scheduling policy: with error number <%i>(%s). See " + "[https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html] " + "for details on how to enable realtime scheduling.", + errno, strerror(errno)); + } + else + { + RCLCPP_INFO( + cm->get_logger(), "Successful set up FIFO RT scheduling policy with priority %i.", + kSchedPriority); +>>>>>>> dd352eb (inform user what reason is for not setting rt policy, inform is policy (#1705)) } // for calculating sleep time From f09512847ac82d403b7c999798c80d27628a226b Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 22 Aug 2024 12:17:47 +0000 Subject: [PATCH 2/2] Fixe merge conflicts --- controller_manager/src/ros2_control_node.cpp | 25 ++++++-------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp index 81a21962cb..8be22e2393 100644 --- a/controller_manager/src/ros2_control_node.cpp +++ b/controller_manager/src/ros2_control_node.cpp @@ -12,11 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include -======= #include ->>>>>>> dd352eb (inform user what reason is for not setting rt policy, inform is policy (#1705)) +#include #include #include #include @@ -54,29 +51,21 @@ int main(int argc, char ** argv) { if (realtime_tools::has_realtime_kernel()) { -<<<<<<< HEAD if (!realtime_tools::configure_sched_fifo(kSchedPriority)) { - RCLCPP_WARN(cm->get_logger(), "Could not enable FIFO RT scheduling policy"); + RCLCPP_WARN( + cm->get_logger(), + "Could not enable FIFO RT scheduling policy: with error number <%i>(%s). See " + "[https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html] " + "for details on how to enable realtime scheduling.", + errno, strerror(errno)); } } else - { - RCLCPP_INFO(cm->get_logger(), "RT kernel is recommended for better performance"); -======= - RCLCPP_WARN( - cm->get_logger(), - "Could not enable FIFO RT scheduling policy: with error number <%i>(%s). See " - "[https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html] " - "for details on how to enable realtime scheduling.", - errno, strerror(errno)); - } - else { RCLCPP_INFO( cm->get_logger(), "Successful set up FIFO RT scheduling policy with priority %i.", kSchedPriority); ->>>>>>> dd352eb (inform user what reason is for not setting rt policy, inform is policy (#1705)) } // for calculating sleep time