GetFrame.parse

static GetFrame.parse(msg, msg_type)[source]

Parses a msg in various possible input formats and tries to return an instance of the class that wraps it.

Parameters:
msgstr or dict

Message encoded as a JSON string or as a Python dictionary.

msg_type: :obj:`str`

ROS message type, eg. std_msgs/String

Returns:
ROSmsg

Instance of the class wrapping the message. Either ROSmsg or one of its sub-classes.