SetDigital.parse

static SetDigital.parse(msg, msg_type)

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

Parameters
  • msg (str or dict) – Message encoded as a JSON string or as a Python dictionary.

  • msg_type (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.