rospy_message_converter repository

Repository Summary

Checkout URI https://github.com/baalexander/rospy_message_converter.git
VCS Type git
VCS Version master
Last Updated 2017-05-06
Dev Status MAINTAINED
Released RELEASED

Packages

Name Version
rospy_message_converter 0.4.0

README

Rospy_message_converter is a lightweight ROS package and Python library to convert from Python dictionaries and JSON messages to rospy messages, and vice versa.

Build status: Build
Status

Usage

Convert a dictionary to a ROS message

from rospy_message_converter import message_converter
from std_msgs.msg import String
dictionary = { 'data': 'Howdy' }
message = message_converter.convert_dictionary_to_ros_message('std_msgs/String', dictionary)

Convert a ROS message to a dictionary

from rospy_message_converter import message_converter
from std_msgs.msg import String
message = String(data = 'Howdy')
dictionary = message_converter.convert_ros_message_to_dictionary(message)

Convert JSON to a ROS message

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
json_str = '{"data": "Hello"}'
message = json_message_converter.convert_json_to_ros_message('std_msgs/String', json_str)

Convert a ROS message to JSON

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
message = String(data = 'Hello')
json_str = json_message_converter.convert_ros_message_to_json(message)

Test

To run the tests:

rostest rospy_message_converter test_all.test

License

Project is released under the BSD license.

Repository Summary

Checkout URI https://github.com/baalexander/rospy_message_converter.git
VCS Type git
VCS Version master
Last Updated 2017-05-06
Dev Status MAINTAINED
Released RELEASED

Packages

Name Version
rospy_message_converter 0.4.0

README

Rospy_message_converter is a lightweight ROS package and Python library to convert from Python dictionaries and JSON messages to rospy messages, and vice versa.

Build status: Build
Status

Usage

Convert a dictionary to a ROS message

from rospy_message_converter import message_converter
from std_msgs.msg import String
dictionary = { 'data': 'Howdy' }
message = message_converter.convert_dictionary_to_ros_message('std_msgs/String', dictionary)

Convert a ROS message to a dictionary

from rospy_message_converter import message_converter
from std_msgs.msg import String
message = String(data = 'Howdy')
dictionary = message_converter.convert_ros_message_to_dictionary(message)

Convert JSON to a ROS message

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
json_str = '{"data": "Hello"}'
message = json_message_converter.convert_json_to_ros_message('std_msgs/String', json_str)

Convert a ROS message to JSON

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
message = String(data = 'Hello')
json_str = json_message_converter.convert_ros_message_to_json(message)

Test

To run the tests:

rostest rospy_message_converter test_all.test

License

Project is released under the BSD license.

Repository Summary

Checkout URI https://github.com/baalexander/rospy_message_converter.git
VCS Type git
VCS Version master
Last Updated 2017-05-06
Dev Status MAINTAINED
Released RELEASED

Packages

Name Version
rospy_message_converter 0.4.0

README

Rospy_message_converter is a lightweight ROS package and Python library to convert from Python dictionaries and JSON messages to rospy messages, and vice versa.

Build status: Build
Status

Usage

Convert a dictionary to a ROS message

from rospy_message_converter import message_converter
from std_msgs.msg import String
dictionary = { 'data': 'Howdy' }
message = message_converter.convert_dictionary_to_ros_message('std_msgs/String', dictionary)

Convert a ROS message to a dictionary

from rospy_message_converter import message_converter
from std_msgs.msg import String
message = String(data = 'Howdy')
dictionary = message_converter.convert_ros_message_to_dictionary(message)

Convert JSON to a ROS message

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
json_str = '{"data": "Hello"}'
message = json_message_converter.convert_json_to_ros_message('std_msgs/String', json_str)

Convert a ROS message to JSON

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
message = String(data = 'Hello')
json_str = json_message_converter.convert_ros_message_to_json(message)

Test

To run the tests:

rostest rospy_message_converter test_all.test

License

Project is released under the BSD license.

Repository Summary

Checkout URI https://github.com/baalexander/rospy_message_converter.git
VCS Type git
VCS Version hydro-devel
Last Updated 2013-07-15
Dev Status MAINTAINED
Released UNRELEASED

Packages

Name Version
rospy_message_converter 0.2.0

README

Rospy_message_converter is a lightweight ROS package and Python library to convert from Python dictionaries and JSON messages to rospy messages, and vice versa.

Build status: Build
Status

Usage

Convert a dictionary to a ROS message

from rospy_message_converter import message_converter
from std_msgs.msg import String
dictionary = { 'data': 'Howdy' }
message = message_converter.convert_dictionary_to_ros_message('std_msgs/String', dictionary)

Convert a ROS message to a dictionary

from rospy_message_converter import message_converter
from std_msgs.msg import String
message = String(data = 'Howdy')
dictionary = message_converter.convert_ros_message_to_dictionary(message)

Convert JSON to a ROS message

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
json_str = '{"data": "Hello"}'
message = json_message_converter.convert_json_to_ros_message('std_msgs/String', json_str)

Convert a ROS message to JSON

from rospy_message_converter import json_message_converter
from std_msgs.msg import String
message = String(data = 'Hello')
json_str = json_message_converter.convert_ros_message_to_json(message)

Test

To run the tests:

rostest rospy_message_converter test_all.test

License

Project is released under the BSD license.