Parse rostopics to JSON
Dear People.
I do have a rosbag with some topics like:
- gps_global_position
- global_position_compass_hdg
- imu_data
- zed_right_image_rect_color_compressed
- occupied_cells_vis_array
- rtabmap_cloud_map
- rtabmap_octomap_occupied_space
- octomap_point_cloud_centers zed_odom
I would like to create a node in ROS where I am able to parse them into a JSON format.
The question is:
Is that possible?
If it possible, what shall be the way to do it?
Is there any suitable package for doing it?
I appreciate any help :)
Cheers
the
rosbridge_suite
does send arbitrary ROS topics to e.g. websockets in a json format. You could check out the implementation there, seems like this file might be a good start. Follow theextract_json_values
function...Or use rospy_message_converter which supports msg <-> JSON conversion as well.
And this reads a bit like a duplicate of #q196365.
Thank you so much for the answer.
I have used
rospy_message_converter
as stated below, it works well :) Now I would like to send the topics that are in json format to RabbitMQ, how can I do that?Thank you :)
This does not seem like a ROS question any more.
I would suggest you post it on a different forum.