From c9d43fda3536bd392fcf0df44d2aea74009889ac Mon Sep 17 00:00:00 2001 From: GuillaumeLaine Date: Fri, 23 Aug 2024 08:48:31 +0200 Subject: [PATCH] log: descriptive timeout messages --- px4_ros2_cpp/src/components/message_compatibility_check.cpp | 4 ++-- px4_ros2_cpp/src/components/mode_executor.cpp | 4 ++-- px4_ros2_cpp/src/components/registration.cpp | 4 ++-- px4_ros2_cpp/src/components/wait_for_fmu.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/px4_ros2_cpp/src/components/message_compatibility_check.cpp b/px4_ros2_cpp/src/components/message_compatibility_check.cpp index d7f7168..014849b 100644 --- a/px4_ros2_cpp/src/components/message_compatibility_check.cpp +++ b/px4_ros2_cpp/src/components/message_compatibility_check.cpp @@ -203,11 +203,11 @@ RequestMessageFormatReturn requestMessageFormat( } } else { - RCLCPP_INFO(node.get_logger(), "no message received"); + RCLCPP_INFO(node.get_logger(), "no MessageFormatResponse message received"); } } else { - RCLCPP_INFO(node.get_logger(), "timeout"); + RCLCPP_INFO(node.get_logger(), "timeout while checking message compatibility"); } } } diff --git a/px4_ros2_cpp/src/components/mode_executor.cpp b/px4_ros2_cpp/src/components/mode_executor.cpp index 9d2a573..0a6bee1 100644 --- a/px4_ros2_cpp/src/components/mode_executor.cpp +++ b/px4_ros2_cpp/src/components/mode_executor.cpp @@ -157,7 +157,7 @@ Result ModeExecutorBase::sendCommandSync( } } else { - RCLCPP_DEBUG(_node.get_logger(), "no message received"); + RCLCPP_DEBUG(_node.get_logger(), "no VehicleCommandAck message received"); } } else { @@ -382,7 +382,7 @@ bool ModeExecutorBase::deferFailsafesSync(bool enabled, int timeout_s) } } else { - RCLCPP_DEBUG(_node.get_logger(), "no message received"); + RCLCPP_DEBUG(_node.get_logger(), "no VehicleStatus message received"); } } else { diff --git a/px4_ros2_cpp/src/components/registration.cpp b/px4_ros2_cpp/src/components/registration.cpp index d7fd4ba..7905317 100644 --- a/px4_ros2_cpp/src/components/registration.cpp +++ b/px4_ros2_cpp/src/components/registration.cpp @@ -145,11 +145,11 @@ bool Registration::doRegister(const RegistrationSettings & settings) } } else { - RCLCPP_INFO(_node.get_logger(), "no message received"); + RCLCPP_INFO(_node.get_logger(), "no RegisterExtComponentReply message received"); } } else { - RCLCPP_INFO(_node.get_logger(), "timeout"); + RCLCPP_INFO(_node.get_logger(), "timeout while registering external component"); } } } diff --git a/px4_ros2_cpp/src/components/wait_for_fmu.cpp b/px4_ros2_cpp/src/components/wait_for_fmu.cpp index 9e7ee20..cdbe1fb 100644 --- a/px4_ros2_cpp/src/components/wait_for_fmu.cpp +++ b/px4_ros2_cpp/src/components/wait_for_fmu.cpp @@ -43,11 +43,11 @@ bool waitForFMU( got_message = true; } else { - RCLCPP_DEBUG(node.get_logger(), "no message received"); + RCLCPP_DEBUG(node.get_logger(), "no VehicleStatus message received"); } } else { - RCLCPP_DEBUG(node.get_logger(), "timeout"); + RCLCPP_DEBUG(node.get_logger(), "timeout while waiting for FMU"); } }