• Stars
    star
    161
  • Rank 233,470 (Top 5 %)
  • Language
    Python
  • Created almost 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Converts between Python dictionaries and JSON to ROS messages.

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

Build Status

ROS Buildfarm

binary deb source deb devel doc
kinetic Build Status Build Status Build Status Build Status
melodic Build Status Build Status Build Status Build Status
noetic Build Status Build Status Build Status Build Status

More Repositories

1

mesh_navigation

Mesh Navigation Stack
C++
199
star
2

rmcl

Mobile Robot Localization in 3D Triangle Meshes
C++
141
star
3

lvr2

Las Vegas Reconstruction 2.0
C++
101
star
4

mesh_tools

C++
90
star
5

ros2_tutorial

Tutorials for the KBS robotics labs
C++
56
star
6

ceres_robot

ceres robot ros driver and tools
Python
47
star
7

sick_tim

A ROS driver for the SICK TiM series of laser scanners.
C++
47
star
8

rmagine

A robot wants to simulate too
C++
44
star
9

pluto_robot

ROS driver for the Pluto robot
Python
39
star
10

rviz_fps_plugin

ViewController and a Tool Plugin to navigate RViz like an FPS-Shooter
C++
32
star
11

tsdf_localization

6D Monte Carlo Localization in 3D TSDF maps
C++
30
star
12

katana_driver

This stack contains hardware drivers, Gazebo plugins and other basic functionalities for the Neuronics Katana family of robot arms.
C++
21
star
13

rmagine_gazebo_plugins

Raycasting based Range Sensor Simulation in Gazebo using Rmagine
C++
19
star
14

radarays_ros

Rotating FMCW radar simulation based on ray tracing
C++
16
star
15

hatsdf_slam

C++
15
star
16

uos_tools

C++
12
star
17

radarays_gazebo_plugins

Rotating FMCW Radar Simulation in Gazebo
C++
11
star
18

basler_tof

ROS driver for the Basler ToF ES camera
C++
11
star
19

transparent_object_reconstruction

Detect and reconstruct transparent objects from scan shadows
C++
9
star
20

mbf_tutorials

Robot Navigation Tutorials for Move Base Flex (MBF)
Python
8
star
21

diffdrive_gazebo_plugin

C++
7
star
22

mbf_recovery_behaviors

Recovery behaviors for the mbf_costmap_nav server of Move Base Flex (MBF)
C++
7
star
23

epos2_motor_controller

Fork of https://devel.iri.upc.edu/pub/labrobotica/drivers/epos2_motor_controller/trunk
C++
6
star
24

calvin_robot

C++
5
star
25

tsdf_localization_demo

demo / examples for tsdf_localization package
CMake
5
star
26

uos_active_perception

FLAP for CAOS: Forward-Looking Active Perception for Clutter-Aware Object Search
C++
4
star
27

open3d_scripts

Python
4
star
28

volksbot_driver

ROS driver for the Volksbot
C++
3
star
29

ReconfROS

C++
2
star
30

radarays

2
star
31

kurt3d

A ROS driver Kurt3D, including the Pololu servo interface.
C++
2
star
32

rmagine_ros

Rmagine-Library usage in ROS
C++
2
star
33

mbf_tools

Tools for Move Base Flex
C++
1
star
34

organized_fast_mesh

C++
1
star
35

infer_hidden_params

Prolog
1
star
36

perception_ar_kinect

C++
1
star
37

ccny_vision

fork of deleted http://robotics.ccny.cuny.edu/git/ccny-ros-pkg/ccny_vision.git
C++
1
star
38

rmcl_msgs

Messages used by RMCL
CMake
1
star
39

kurt_navigation

CMake
1
star
40

lvr_ros

C++
1
star
41

hatsdf_base_design

Tcl
1
star
42

pluto_apps

Applications for the Pluto robot
C++
1
star
43

lucia_turtlebot

ROS stack for the Lucia Winter School 2016.
C++
1
star