From 84be6189a53713953357fa4509cf43be6e9d686d Mon Sep 17 00:00:00 2001 From: "Dr. Denis" Date: Mon, 17 Jul 2023 20:03:16 +0200 Subject: [PATCH] Add warning output if component is not initialized. --- hardware_interface/src/resource_manager.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hardware_interface/src/resource_manager.cpp b/hardware_interface/src/resource_manager.cpp index 8a58baf9361..61a3fe5a339 100644 --- a/hardware_interface/src/resource_manager.cpp +++ b/hardware_interface/src/resource_manager.cpp @@ -587,6 +587,13 @@ class ResourceStorage import_state_interfaces(container.back()); import_command_interfaces(container.back()); } + else + { + RCUTILS_LOG_WARN_NAMED( + "resource_manager", + "Actuator hardware component '%s' from plugin '%s' failed to initialize.", + hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str()); + } }; if (hardware_info.is_async) @@ -609,6 +616,12 @@ class ResourceStorage { import_state_interfaces(container.back()); } + { + RCUTILS_LOG_WARN_NAMED( + "resource_manager", + "Sensor hardware component '%s' from plugin '%s' failed to initialize.", + hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str()); + } }; if (hardware_info.is_async) @@ -632,6 +645,12 @@ class ResourceStorage import_state_interfaces(container.back()); import_command_interfaces(container.back()); } + { + RCUTILS_LOG_WARN_NAMED( + "resource_manager", + "System hardware component '%s' from plugin '%s' failed to initialize.", + hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str()); + } }; if (hardware_info.is_async)