ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

juls's profile - activity

2022-10-17 02:40:39 -0500 received badge  Famous Question (source)
2022-05-18 09:09:06 -0500 received badge  Student (source)
2020-03-26 01:33:26 -0500 received badge  Notable Question (source)
2017-12-05 16:49:48 -0500 received badge  Famous Question (source)
2017-12-05 16:49:48 -0500 received badge  Notable Question (source)
2017-12-05 16:40:59 -0500 received badge  Notable Question (source)
2017-11-06 07:40:45 -0500 received badge  Famous Question (source)
2017-11-06 07:40:42 -0500 received badge  Popular Question (source)
2017-06-20 15:48:57 -0500 received badge  Popular Question (source)
2017-04-11 03:17:40 -0500 received badge  Famous Question (source)
2016-08-04 11:21:37 -0500 received badge  Notable Question (source)
2016-03-18 19:47:50 -0500 received badge  Notable Question (source)
2016-03-03 04:15:46 -0500 received badge  Popular Question (source)
2016-03-03 04:12:49 -0500 received badge  Popular Question (source)
2016-02-20 05:33:21 -0500 received badge  Popular Question (source)
2016-02-19 09:56:51 -0500 asked a question Writing a launch file

Hi everyone. I have created a node, which is a nodelet loader. I have also created a plugin, and a plugin analyzer class. I want to load my plugin to the nodelet, action which i perform with class_loader class inside the nodelet's source file. So my question is how to write a launch file which starts the nodelet loader, loads the nodelet and also reads as parameter the analyzer plugin yaml file. My launch file which fails which i wrote for doing the above has as follows:

<node pkg="my_package" type="my_nodelet_loader_class" name="name" output="screen">
            <rosparam command="load" file="$(find my_package)/param/my_analyzer_file.yaml"/>

After debugging i've realized that the the nodelet loader starts, the analyzer plugin yaml file is read and the parameters are properly stored in the parameter server, but when the loader tries to load the nodelet plugin fails. So i might miss something in relation with the nodelet plugin definition inside the launch file. I also need to notice that the nodelet's .xml file, and the export tag in package manifest.xml are defined properly. Thank you in advance.

2016-02-18 07:59:33 -0500 asked a question Diagnostic aggregator Analyzer plugins are not running

Hello everyone. I have the following problem: I created a ros nodelet which inherits diagnostics::diagnostic_aggregator. The analyzer plugins are properly configured and loaded in the parameter server under my nodelet's namespace. Despite the fact that running rqt_graph it displays that my nodelet publishes in /diagnostic_agg topic, when i run "rostopic echo /diagnostic_agg" nothing appears, which means that my analyzers report methods does not work as they should.

I also need to note, that the same analyzer plugins were tested in a common diagnostics::diagnostic_aggregator node, and properly publish in /diagnostic_agg topic.

What am i doing wrong??? Also when i am trying to debug the plugin code from Qt, the breakpoints entered in the analyzers' code are "ignored"....meaning that i cannot step into analyzers code. Thank you in advance.

2016-02-17 04:16:03 -0500 asked a question Problem loading diagnostic aggregator analyzers

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() :
  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.

2016-02-16 09:58:51 -0500 asked a question Can i create a ROS nodelet which inherits from diagnostic_aggregator::Aggregator

Hello everyone,

i am new to ROS and i want to create a ROS nodelet which inherits from diagnostic_aggregator::Aggregator class. My problem is that i cannot define diagnostic_aggregator::Aggregator() constructor implicitly in the derived class constructor, i get the following type of error messages for all private members of diagnostic_aggregator::Aggregator class define diagnostic_aggregator::Aggregator members :

 /opt/ros/indigo/include/diagnostic_aggregator/aggregator.h:131: error: 'double diagnostic_aggregator::Aggregator::pub_rate_' is private
       double pub_rate_;

my code: in the class source file:

SafetyMaintainer::SafetyMaintainer(double pub_rate, diagnostic_aggregator::AnalyzerGroup* analyzer_group, diagnostic_aggregator::OtherAnalyzer* other_analyzer, std::string base_path)
    : job_action_client_("job", true),
      pub_rate_(pub_rate), analyzer_group_(analyzer_group), other_analyzer_(other_analyzer), base_path_(base_path)

in the header file:

   SafetyMaintainer(double, diagnostic_aggregator::AnalyzerGroup*, diagnostic_aggregator::OtherAnalyzer*, std::string)

What is the proper way of defining the diagnostic_aggregator::Aggregator constructor implicitly in the derived class constructor, or how can i inherit from diagnostic_aggregator::Aggregator class? Thank you in advance!

2016-02-15 04:55:51 -0500 asked a question How to properly configure a diagnostics analyzer plugin in ROS

Hello to everyone, i am new to ROS and i have the following problem:

I want to create an Analyzer plugin so as to process messages posted in the /diagnostics topic.

The Analyzer class has been implemented exactly as it is described in the . Inside the ROS package home folder the plugin.xml(sample_analyzer_plugin.xml in my case) file it is defined as follows:

<library path="lib/libsample_analyzer"><class name="SampleAnalyzer" type="diagnostic_aggregator::SampleAnalyzer" base_class_type="diagnostic_aggregator::Analyzer"><description>
      SampleAnalyzer is tutorial for writing diagnostic analyzers.

where myrmex_safety_reporter the ROS package name. And is exported in the package.xml as follows:

<export><!-- Other tools can request additional information be placed here 
--><diagnostic_aggregator plugin="${prefix}/sample_analyzer_plugin.xml"/></export>

In the package's CMakeLists.txt catkin dependencies to diagnostic_aggregator, diagnostic_msgs, pluginlib and the following are added:

add_library(sample_analyzer src/sample_analyzer.cpp ${ANALYZER_HEADERS})
target_link_libraries(sample_analyzer ${catkin_LIBRARIES})


And after the build the is properly created.

I have implemented a publisher in python exactly as it is described in the ROS paradigm, and it works fine. I have created the following launch file, called base.launch so as to load my plugin to the diagnostics_aggregator:

      <node pkg="diagnostic_aggregator" type="aggregator_node" name="diagnostic_aggregator">
        <rosparam command="load" file="$(find myrmex_safety_reporter)/param/sample_analyzer_load.yaml"/>

the sample_analyzer_load.yaml is defined as follows (exactly like the ROS example):

pub_rate: 1.0 # Optional, defaults to 1.0
    type: SampleAnalyzer
    power_board_name: Power board 1000

I have overriden the Analyzer's report method so as to return only specific fields of the message and not the entire message in the /diagnostics_agg as follows:

vector<boost::shared_ptr<diagnostic_msgs::DiagnosticStatus> > SampleAnalyzer::report()
  boost::shared_ptr<diagnostic_msgs::DiagnosticStatus> eth_stat = eth_master_item_->toStatusMsg(path_);
    ROS_INFO("Overrided Analyzer report function");
  // If we have power data, and runstop is hit, we'll suppress errors
  if (has_eth_data_ && has_power_data_ && runstop_hit_)
    eth_stat->level = diagnostic_msgs::DiagnosticStatus::OK;

  vector<boost::shared_ptr<diagnostic_msgs::DiagnosticStatus> > output;
  boost::shared_ptr<diagnostic_msgs::DiagnosticStatus> processed_msg (new diagnostic_msgs::DiagnosticStatus);
  return output;

Now after launching the diagnostic aggregator with:

roslaunch myrmex_safety_reporter base.launch

I see that in the diagnostics_agg topic the entire messages are published, instead of specific fields that i defined in the Analyzer report method.

This means that the Analyzer's report method is not overriden or that my SampleAnalyzer is not loaded!!! How can i load my own analyzer in the diagnostic_aggregator??? Any suggestions it would be useful!!! Thank you in Advance.