Creating/Parsing a dictionary of dictionary params
Hi everyone,
I am looking for help with some slightly more complex parameters than normal. The main motivation for this question is I am creating a node that must handle multiple pieces of hardware, and I must pass it unique parameters for each hardware. The number of hardware pieces is not defined and so I must be able to have any number of hardware/params (e.g. can't do left_camera and right_camera params).
I found that with rosparam I can create a list or dictionary parameter, and then parse it with roscpp. From my research I think I need to create a dictionary of dictionaries, but unfortunately I haven't been able to figure out how to properly create/parse such a parameter.
Inside my launchfile I have something that looks like:
<rosparam param="hardware">
hw1: { param1: value, param2: value }
hw2: { param1: value, param2: value }
hw3: { param1: value, param2: value }
</rosparam>
Based on the example here http://wiki.ros.org/roslaunch/XML/ros... I can see how to create a XmlRpcValue type, but I'm still unclear on how to parse a more complex param. Any help is appreciated! Also feel free to tell me if this is the wrong way to handle this situation in ROS, I'd like to try to stick to ROS standards as much as possible.