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

Update the way to set the rate, according to last iri_base_algorithm version

parent ad80242e
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ VisualGpsAlgNode::VisualGpsAlgNode(void) :
//init class attributes if necessary
double rate;
this->private_node_handle_.param<double>("framerate", rate, 10.0);
this->loop_rate_ = rate;//in [Hz]
this->setRate(rate);//in [Hz]
// [init publishers]
this->pose_publisher_ = this->private_node_handle_.advertise<geometry_msgs::PoseStamped>("pose", 1);
......@@ -304,7 +304,12 @@ void VisualGpsAlgNode::set_exposure_mutex_exit(void)
void VisualGpsAlgNode::node_config_update(Config &config, uint32_t level)
{
this->alg_.lock();
this->loop_rate_ = config.framerate;
static double last_rate=1;
if(last_rate!=config.framerate)
{
this->setRate(config.framerate);
last_rate=config.framerate;
}
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