All Projects → facontidavide → ros_type_introspection

facontidavide / ros_type_introspection

Licence: MIT license
Deserialize ROS messages that are unknown at compilation time

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to ros type introspection

bytekit
Java 字节操作的工具库(不是字节码的工具库)
Stars: ✭ 40 (-27.27%)
Mutual labels:  deserialize
esp-idf-json
Example of JSON Serialize and Deserialize in ESP-IDF
Stars: ✭ 29 (-47.27%)
Mutual labels:  deserialize
envy
envy: Deserialize environment variables into type-safe structs
Stars: ✭ 64 (+16.36%)
Mutual labels:  deserialize
bluetooth-gatt-parser
Bluetooth GATT service and characteristic parser
Stars: ✭ 61 (+10.91%)
Mutual labels:  deserialize
kafka-serde-scala
Implicitly converts typeclass encoders to kafka Serializer, Deserializer, Serde.
Stars: ✭ 52 (-5.45%)
Mutual labels:  deserialize
Plotjuggler
The Time Series Visualization Tool that you deserve.
Stars: ✭ 2,620 (+4663.64%)
Mutual labels:  rosbag
SASensorProcessing
ROS node to create pointcloud out of stereo images from the KITTI Vision Benchmark Suite
Stars: ✭ 26 (-52.73%)
Mutual labels:  rosbag
ros hadoop
Hadoop splittable InputFormat for ROS. Process rosbag with Hadoop Spark and other HDFS compatible systems.
Stars: ✭ 92 (+67.27%)
Mutual labels:  rosbag

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an "IDL compiler", i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only "problem" is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don't know in advance which ROS Messages you will need to read. Therefore, you won't be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].