Skip to content

Commit 9aea8e7

Browse files
committed
fix the gazebo registration usecase
1 parent 2f80369 commit 9aea8e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

controller_manager/src/controller_manager.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,14 @@ void ControllerManager::init_resource_manager(const std::string & robot_descript
745745
get_logger(), "Component name is empty, skipping statistics registration for it.");
746746
continue;
747747
}
748+
if (!component_info.read_statistics && !component_info.write_statistics)
749+
{
750+
RCLCPP_WARN(
751+
get_logger(),
752+
"Component '%s' does not have read or write statistics initialized, skipping registration.",
753+
component_name.c_str());
754+
continue;
755+
}
748756
RCLCPP_INFO(get_logger(), "Registering statistics for : %s", component_name.c_str());
749757
const std::string read_cycle_exec_time_prefix =
750758
component_name + ".stats/read_cycle/execution_time";

0 commit comments

Comments
 (0)