Skip to content

Commit

Permalink
Fix wrong warning
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Nov 24, 2024
1 parent 5281023 commit 66a6ffe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,13 @@ class ResourceStorage
auto interfaces = hardware.export_state_interfaces();
const auto interface_names = add_state_interfaces(interfaces);

RCLCPP_WARN(
get_logger(),
"Importing state interfaces for the hardware '%s' returned no state interfaces.",
hardware.get_name().c_str());

if (interface_names.empty())
{
RCLCPP_WARN(
get_logger(),
"Importing state interfaces for the hardware '%s' returned no state interfaces.",
hardware.get_name().c_str());
}
hardware_info_map_[hardware.get_name()].state_interfaces = interface_names;
available_state_interfaces_.reserve(
available_state_interfaces_.capacity() + interface_names.size());
Expand Down

0 comments on commit 66a6ffe

Please sign in to comment.