From dd352eb45a9a983116f61dc1a5fc650003844cf3 Mon Sep 17 00:00:00 2001 From: Manuel Muth Date: Thu, 22 Aug 2024 11:05:06 +0200 Subject: [PATCH] inform user what reason is for not setting rt policy, inform is policy (#1705) --- controller_manager/src/ros2_control_node.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp index 44c9c37aed..8afc81877f 100644 --- a/controller_manager/src/ros2_control_node.cpp +++ b/controller_manager/src/ros2_control_node.cpp @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include #include @@ -51,10 +52,16 @@ int main(int argc, char ** argv) { RCLCPP_WARN( cm->get_logger(), - "Could not enable FIFO RT scheduling policy. Consider setting up your user to do FIFO RT " - "scheduling. See " + "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."); + "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); } // for calculating sleep time