This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
Adding JSON to ROS Message Serialization Functionality #25
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 of ros_msg_parser by adding support for converting JSON strings into ROS messages without knowing the message type in compilation time. IMO, this functionality fills a crucial gap in the ROS ecosystem, particularly for scenarios where dynamic integration with external systems like MQTT brokers is required.
The motivation behind this update is to provide a dynamic integration mechanism similar to what is offered by the Python-based ros_bridge package, but for C++ which lacks reflection capabilities.
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 pull request 51 , 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 functionality and added the required tests to ensure the correctness.
-Demonstrated the correct integration of the new function 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 seamlessly into the codebase following the same coding style, so that the edits don't look like a sore thumb!, and also insuring backward compatibility.
I believe this update benefits ROS interoperability, and is important to the community,