Bi-directional dynamic_reconfigure
I have a few parameters that can be controlled either via dynamic_reconfigure, or via a subscriber, or by updating their value to the state of the hardware they act with.
One direction works well - when I set a value using dynparam or rqt_reconfigure, an action is commanded to the hardware and a parameter update is published automatically.
I want to know if there is a tutorial or at least guideline on how to deal with the other direction - something else (hw event, subscribed message) changes the state and I need the parameters to reflect it.
Obviously, using dynamic_reconfigure.client is not the right way to do it, because it would issue commands instead of just changing parameter values.
So I try publishing directly on ~/parameter_updates
and manually setting the parameter value on the parameter server, which somehow works, but still it seems quite unreliable and cumbersome.
Is there a better way to do it?