dynamic_reconfigure with programatically filled enum?
Hey ROS gurus. I want to ask you for your opinions to a topic I recently thought about.
I'm writing a ROS&Python driver for a series of web cameras. There is a lot of variability in the specific models, including supported image resolutions.
Now I want to offer a dynamic_reconfigure interface for setting (not only) video resolution. My basic thought was to filter a list of possible resolutions somehow to only publish the supported resolutions on parameter_descriptions
(thus displaying only them in rqt_reconfigure
).
But then I found out that even the set of possible resolutions is not bound and new resolutions may emerge with new camera models.
I have 2 ideas on what to do with that:
- alter
dynamic_reconfigure
and create anotheredit_method
(that's lot of work, though) - create my own implementation of
dynamic_reconfigure.Server
, which would read the allowed resolutions from somewhere and would publish the correspondingparameter_descriptions
. In thecfg
file I would probably create a dummy one-element enum in order not to stop existing tools from working.
I'm only concerned about this solution working from dynamic_reconfigure
CLI, rqt_reconfigure
and Python (ideally using the standard Client
). I don't (yet) care about C++ clients.
Before I start working, could you please give me some feedback on how you like these ideas and what possible shortcomings do you see?