Skip to content
Snippets Groups Projects
Commit 355eeb08 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Set the diagnostic_period in the constructor. Used its value to control the...

Set the diagnostic_period in the constructor. Used its value to control the sleep in the local spin function.
parent 77dfa256
No related branches found
No related tags found
No related merge requests found
......@@ -351,6 +351,9 @@ IriBaseNodeDriver<Driver>::IriBaseNodeDriver(const ros::NodeHandle &nh) :
// initialize class attributes
// allow Ctrl+C management
signal(SIGHUP, &IriBaseNodeDriver<Driver>::hupCalled);
// set the diagnostic updater period
this->private_node_handle_.setParam("diagnostic_period",0.1);
}
template <class Driver>
......@@ -536,7 +539,7 @@ int IriBaseNodeDriver<Driver>::spin(void)
// update diagnostics
this->diagnostic_.update();
ros::WallDuration(0.1).sleep();
ros::WallDuration(this->diagnostic_.getPeriod()).sleep();
}
// try to go to the closed state
......
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