Dynamic reconfigure default values not working
Hi. I hope I'm not missing some silly thing but the default values in my dynamic reconfigure configuration are not working in my python node. Anybody else is using this and can tell me if this should work?
This is my cfg file:
#!/usr/bin/env python
PACKAGE = "image_adaptor"
import roslib;roslib.load_manifest(PACKAGE)
from dynamic_reconfigure.parameter_generator import *
gen = ParameterGenerator()
## gen.add("name", type_t, level, "Description", DefaultValue, MinValue, MaxValue)
gen.add("prop_rgb_resolution", int_t, 0, "Specific resolution for RGB camera", 2, 1, 4)
gen.add("prop_rgb_frequency", int_t, 0, "Specific frequency for RGB camera", 30, 15, 60)
gen.add("prop_rgb_image_mode", int_t, 0, "Specific image mode for RGB camera", 2, 1, 9)
exit(gen.generate(PACKAGE, "image_adaptor", "Properties"))
The code is simplified and was done according to the tutorial (http://ros.org/wiki/dynamic_reconfigure/Tutorials/HowToWriteYourFirstCfgFile) but when I read the setted values they are always the maximum values instead of my defaults.
It looks like the usual silly mistake but this time I really can't find it.
This may be a clue or maybe it is a different problem but with a string vble the default value is the one in the first execution until I restart ros even if I recompile the cfg file and execute everything again:
gen.add("rect_rgb_image", str_t, 0, "Rgb rectified image", "Default Value")
Thanks in advance!