Skip to content

Commit

Permalink
Add warning output if component is not initialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl committed Jul 18, 2023
1 parent a2c8720 commit 7d1baef
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 7d1baef

Please sign in to comment.