Open vbelkina opened 1 year ago
I assume you're asking about the required format (data layout) of the JSON string in order to create a Twist message.
To answer these kinds of questions you can always "go the opposite direction": take a arbitrarily instantiated Twist message (or whatever ROS message you're interested in) and convert it to JSON:
>>> from geometry_msgs.msg import Twist
>>> from rospy_message_converter import json_message_converter
>>> json_message_converter.convert_ros_message_to_json(Twist())
'{"linear": {"x": 0.0, "y": 0.0, "z": 0.0}, "angular": {"x": 0.0, "y": 0.0, "z": 0.0}}'
Likewise for convert_ros_message_to_dictionary
obviously.
Hello,
I am wondering if you could give an example of formatting the JSON to send a Twist message.
Thank you!