Dynamic Reconfigure Keep Publishing
Hi, I used dynamic reconfigure with rqt and I found that the topics keep publishing even there is no change in the value. Is there any way to configure dynamic reconfigure to publish topic only when there is an update? I am using Kinetic on a PC. Thanks!
Update:
I am using the below code for the dynamic server.
#!/usr/bin/env python
PACKAGE = "mypackage"
from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()
gen.add("double_param_1", double_t, 0, "A double parameter", .1, 0, 1)
gen.add("double_param_2", double_t, 0, "A double parameter", .1, 0, 1)
exit(gen.generate(PACKAGE, "mypackage", "mypackage_"))
What is the dynamic reconfigure server you are connecting to? How the server is implemented is possibly where the fault lies. Other than that is there any other client to the server running at the same time as the rqt dynamic reconfigure plugin?
HI Lucasw:
I am using the below code for the dynamic server. Sorry that I cannot post the code in the comment due to the number of characters limitation. Thanks!
@ytosclee there are character limits in the comments because they're supposed to be short. If you're going to be giving more information about your question then please use the "edit" button.
@ytosclee is that what you have for your server? That's a
cfg
file which is used to define the parameters. You need to implement the server. Take a look at the tutorials.@ytosclee Update the question with your python or C++ code that runs the server.
Hi Lucasw and Jayess:
I found out my problem. I publish data in the server code and I should not do that. I should subscribe to /node/parameter_updates instead. Thanks for the help!
Best Regards,
Ytosclee