Skip to content

improve serialization usage #119

@asmodehn

Description

@asmodehn

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'}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions