Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Adding JSON to ROS Message Serialization Functionality #25

wants to merge 1 commit into from

Conversation

ahmad-ra
Copy link

@ahmad-ra ahmad-ra commented Feb 11, 2024

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,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant