Skip to content

Software

rclpy_message_converter

By DFKI Niedersachsen, Germany (checked on github.com/DFKI-NI (opens in a new tab)), from github.com/DFKI-NI/rospy_message_converter (opens in a new tab)

  • Middleware
  • Library
  • BSD-3-Clause

A lightweight ROS package and Python library that converts between Python dictionaries or JSON and ROS messages, in both directions.

Facts

GitHub stars
234read on 28 Nov 2026
Last update
27 Apr 2026Newest commit on master
Maintenance
Maintaineda commit in the last 12 months
Difficulty
Beginner

Checked on GitHub on 29 Nov 2026.

Licenses

Code
BSD-3-Clause (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (BSD-3-Clause) at commit 6d907be (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Converts a Python dictionary into a ROS message of a given type, such as std_msgs/String.
  • Converts a ROS message back into a Python dictionary.
  • Converts JSON strings to ROS messages and ROS messages to JSON.
  • The master branch targets ROS 1; ROS 2 users pick the branch matching their distro (foxy, galactic, humble, rolling, and others).
  • Includes a test suite run with catkin_make test and pre-commit formatting checks.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
BSD-3-Clause. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Maintained, last commit on 27 Apr 2026.

Use it

How to install it, in the creator's words: The project's README (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 6d907be

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by DFKI Niedersachsen, at commit 6d907be, under BSD-3-Clause (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

rospy_message_converter

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.

ROS 1 and ROS 2 branches

ROS 1 users should use the master branch. ROS 2 users should use the appropriate branch for their distro (foxy/galactic/humble/rolling/...).

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:

catkin_make test
pre-commit Formatting Checks

This repo has a pre-commit (opens in a new tab) check that runs in CI. You can use this locally and set it up to run automatically before you commit something. To install, use pip:

pip3 install --user pre-commit

To run over all the files in the repo manually:

pre-commit run -a

To run pre-commit automatically before committing in the local repo, install the git hooks:

pre-commit install
License

Project is released under the BSD license.

GitHub actions - Continuous Integration

(opens in a new tab)

ROS Buildfarm
binary debsource debdeveldoc
noeticImage: Build Status (opens in a new tab) (opens in a new tab)Image: Build Status (opens in a new tab) (opens in a new tab)Image: Build Status (opens in a new tab) (opens in a new tab)Image: Build Status (opens in a new tab) (opens in a new tab)

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.