How can i acess my parameters from the dynamic reconfigure server ?
So I already read the tutorials about the dynamic reconfiguration, my problem now is that the tutorials use ros.spin() therefor as long as i dont change a value in the gui i dont get a callback and as a result my code just got stuck than.
I change the code now a bit to
int main(int argc, char **argv) {
ros::init(argc, argv, "dynamic_tutorials");
dynamic_reconfigure::Server<dynamic_tutorials::TutorialsConfig> server;
dynamic_reconfigure::Server<dynamic_tutorials::TutorialsConfig>::CallbackType f;
f = boost::bind(&callback, _1, _2);
while(true)
{
server.setCallback(f);
ROS_INFO("Spinning node");
ros::spinOnce();
}
return 0;
}
well now i get the values each loop. but the problem is that at each loop the gui gets updated this makes it now imposible in the gui to change any value in a textbox like strings. changing sliders/checkboxes is working fine.
as I think its a problem with the server.setCallback function I wana know if there is an other way to get my parameters.
EDIT:
void callback(dynamic_tutorials::TutorialsConfig &config, uint32_t level) {
ROS_INFO("Reconfigure Request: %d %f %s %s %d",
config.int_param, config.double_param,
config.str_param.c_str(),
config.bool_param?"True":"False",
config.size);
}
Could you post your callback code too?