Refactor codec config parsing
I'm working on a shim node for CoExploration that needed to also know the queue configuration ... and rather than writing a third version of the parameter parsing code, I went ahead and created a utility that would provide that functionality, and refactored packet_dispatch_node and message_queue_node to use it.
Questions:
- I couldn't figure out how to set up catkin+python to be able to call
import ros_acomms.config_parser
without borking message imports. As is, it mirrors the acomms_codecs package, which can be imported by an external script as simplyimport acomms_codecs
. Is there a better way that you'd prefer I use? - I'm not clear about when you'd ever have multiple packet codecs in a single config file. Some of the existing code seems to support that, and some does not (see my comment in package_dispatch_node). Will that be a problem?
- The existing code is sometimes inconsistent as to whether a given codec config parameter should have a default value or not. For those parameters, I made them required.
I like this refactor because it sets the repo up to be able to easily iterate on codec config file formats, and I'm eager to get rid of the copy-paste involved in having a one-to-one map between queues and codecs.