Can i create a ROS nodelet which inherits from diagnostic_aggregator::Aggregator [closed]
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!