Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve serialization usage #119

Open
asmodehn opened this issue Nov 15, 2016 · 2 comments
Open

improve serialization usage #119

asmodehn opened this issue Nov 15, 2016 · 2 comments

Comments

@asmodehn
Copy link
Member

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'}
@asmodehn
Copy link
Member Author

This is actually a good reason to have a separated library for ROS <-> python message conversion...

@asmodehn
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant