Functions
rospy_message_converter.json_message_converter Namespace Reference

Functions

def convert_json_to_ros_message (message_type, json_message)
 
def convert_ros_message_to_json (message)
 

Function Documentation

def rospy_message_converter.json_message_converter.convert_json_to_ros_message (   message_type,
  json_message 
)
Takes in the message type and a JSON-formatted string and returns a ROS
message.

Example:
    message_type = "std_msgs/String"
    json_message = '{"data": "Hello, Robot"}'
    ros_message = convert_json_to_ros_message(message_type, json_message)

Definition at line 4 of file json_message_converter.py.

def rospy_message_converter.json_message_converter.convert_ros_message_to_json (   message)
Takes in a ROS message and returns a JSON-formatted string.

Example:
    ros_message = std_msgs.msg.String(data="Hello, Robot")
    json_message = convert_ros_message_to_json(ros_message)

Definition at line 17 of file json_message_converter.py.



rospy_message_converter
Author(s): Brandon Alexander
autogenerated on Tue May 7 2019 03:17:53