-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
It seems some people are having trouble grasping how serialization between JSON and ROS work.
It is currently too much "magic"
It would help to expose tools to th use that directly do the conversion.
Also some (tested) doc about it wouldn't hurt, people don't usually look into test code :
>>> import pyros.rosinterface.message_conversion as msg_conv
>>> test_data = { 'data': 'testing' }
>>> import std_msgs.msg as std_msgs
>>> rosstr = std_msgs.String()
>>> rosstr
data: ''
>>> rosstr._type
'std_msgs/String'
>>> msg_conv.populate_instance( test_data, rosstr)
data: testing
>>> msg_conv.extract_values(rosstr)
{'data': 'testing'}
Reactions are currently unavailable