Skip to content
Snippets Groups Projects
Commit 8ae67d89 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Add cfg params

parent 0b05090a
No related branches found
No related tags found
No related merge requests found
......@@ -39,5 +39,9 @@ gen = ParameterGenerator()
# Name Type Reconf.level Description Default Min Max
gen.add("rate", double_t, 0, "Main loop rate (Hz)", 10.0, 0.1, 1000.0)
gen.add("feedback_status_text", str_t, 0, "Feedback text", "feedback text example")
gen.add("finish_action_with_success", bool_t, 0, "End action with success", False)
gen.add("finish_action_with_failure", bool_t, 0, "End action with failure", False)
exit(gen.generate(PACKAGE, "AdcJuryServerAlgorithm", "AdcJuryServer"))
\ No newline at end of file
exit(gen.generate(PACKAGE, "AdcJuryServerAlgorithm", "AdcJuryServer"))
......@@ -164,8 +164,9 @@ void AdcJuryServerAlgNode::adc_juryGetFeedbackCallback(iri_adc_msgs::adc_juryFee
{
this->alg_.lock();
//update feedback data to be sent to client
feedback->status = "test";
feedback->status = this->config_.feedback_status_text;
//ROS_INFO("feedback: %s", feedback->data.c_str());
//ROS_INFO("AdcJuryServerAlgNode::adc_juryGetFeedbackCallback feedback.status='%s'", feedback->status.c_str());
this->alg_.unlock();
}
......@@ -177,6 +178,21 @@ void AdcJuryServerAlgNode::node_config_update(Config &config, uint32_t level)
this->alg_.lock();
if(config.rate!=this->getRate())
this->setRate(config.rate);
if(config.finish_action_with_success)
{
this->adc_jury_finished=true;
this->adc_jury_succeeded=true;
config.finish_action_with_success=false;
}
if(config.finish_action_with_failure)
{
this->adc_jury_finished=true;
this->adc_jury_succeeded=false;
config.finish_action_with_failure=false;
}
this->config_=config;
this->alg_.unlock();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment