-
Notifications
You must be signed in to change notification settings - Fork 48
ogma-core: ROS backend is overly specific and complex #244
Description
Description
The current ROS backend is overly specific, complex and composes data manually. For example, it assumes a specific structure for the message handlers. It also extracts data from data structures, manually converts it to strings, and then packs it into a JSON structure.
This limits user's abilities to adjust the template to fit their needs, since most of the data is given as fixed strings (e.g., variable declarations are given as multiple lines, rather than letting users access each variable declaration and, within them, each type and name individually.
It would be better to make more raw data available to the template, and have the template present the data as needed. That would likely also decrease the differences across backends, making the code easier to maintain.
Type
- Feature: Make backend more versatile.
Additional context
None.
Requester
- Ivan Perez.
Method to check presence of bug
Not applicable (not a bug).
Expected result
The ROS template has raw structured data available about the different portions of the application, and can be adjusted to present it as needed.
Desired result
The ROS template has raw structured data available about the different portions of the application, and can be adjusted to present it as needed.
Proposed solution
Modify ROS backend to leverage aeson capabilities to make a data structure available to the ROS template, and move as much as possible of the current logic in the ROS backend directly to the template.
Further notes
This situation also affects other backends. We limit this issue to the ROS backend to make the work smaller, easier to complete, and to reduce risk.