Problem loading diagnostic aggregator analyzers

asked 2016-02-17 04:16:03 -0500

juls gravatar image

Hi everyone. I have created a nodelet which inherits from diagnostic_aggregator, and i try to load some Analyzers, but i am getting the following error:

[ERROR] [1455701271.351054532]: Unable to find Analyzer class "ros_pkg_name"/"my_analyzer_name". Check that Analyzer is fully declared.
[ERROR] [1455701271.351182915]: No analyzers initialzed in AnalyzerGroup /"ros_pkg_name"/analyzers
[ERROR] [1455701271.351207463]: Analyzer group for diagnostic aggregator failed to initialize!

I need to note that the analyzers were tested and properly loaded to a common diagnostic_aggregator, but not in the nodelet which inherits the diagnostic_aggregator. Is it configuration or implementation problem? I took a look in github in the diagnostic_aggregator/aggregator code and i have realized that my code crashed in the AnalyzerGroup::init, in the following code section:

if (analyzers_.size() == 0)
  {
    init_ok = false;
    ROS_ERROR("No analyzers initialzed in AnalyzerGroup %s", analyzers_nh.getNamespace().c_str());
  }

where analyzers_ the analyzer vector read from ROS Parameter Server. This means that no analyzers are retrieved for my nodelet.

Also reading the code, i have noriced that when the analyzer group is created for the diagnostic_aggregator, the analyzer base path is given hard coded:

AnalyzerGroup::AnalyzerGroup() :
  path_(""),
  nice_name_(""),
  analyzer_loader_("diagnostic_aggregator", "diagnostic_aggregator::Analyzer")
{ }

Do i have to overied the AnalyzerGroup constructor, or to implicitily redifine it in a new class which inherits AnalyzerGroup???

Any ideas/suggestions??? Please help.

edit retag flag offensive close merge delete