create rosmsg content from string
With python: I want to in a generic way dynamically create ros messages where the values comes from a string representation. For example lets say I have a message definition:
float32 a
uint8 b
And I have the values of a and b in some string format, for example
a="1.23" b="17"
I need some conversion that knows that "a" is a float and "b" is an int. Does ROS messages comes with any "fromString/fromXml/fromYaml" methods? I know yaml can be used from the command line, e.g. with "rostopic pub". Is any of this functionality available from a python script?