Add JSON<->ROS message serialization/deserialization. #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enhancing the capabilities by adding support for converting JSON strings into/from ROS messages at runtime. IMO, this functionality fills a crucial gap in the ROS ecosystem, particularly for scenarios where integration with external systems like MQTT brokers is required.
The motivation behind this PR is to provide a dynamic integration mechanism similar to what is offered by the Python-based ros_bridge package, but for C++.
The core reason is to bridge ROS C++ with MQTT brokers using json payloads, dynamically casting json objects into ROS messages.
I edited mqtt_client and did PR, which depends on the updates of this package.
The mqtt_client already have a couple of open issues regarding this functionality.
Key Contributions:
-Implemented the JSON<->ROS-msg Serializer/Deserializer and added the required tests to ensure correctness.
-Demonstrated the correct integration into the existing package by adding a test of the complete cycle of serialization, deserializeIntoJson, and serializeFromJson into a ROS message.
-Most importantly, I tried my best to integrate it correctly into the code base following the same coding style, so that the code base remains homogeneous, and also insuring backward compatibility.
I believe this PR benefits ROS interoperability, and is important to the community,