I am working on a project where I need to plot data from ROS2 array topics using rqt_plot. The data I'm dealing with involves multiple array topics, which are published per cycle from another node. The structure of the ROS2 topics is as follows:
float32[] range_m
float32[] velocity_mps
float32[] acceleration_mps2
... (other similar array structures)
Each of these topics represents an array of values that I need to plot in each cycle. However, rqt_plot in its current form has limitations in plotting array topics, particularly when it comes to handling the entire array data for each cycle. It seems to only support plotting specific indexed elements of array topics.
I already attempted and did some research like, modifying rqt_plot for Array Topics: I tried to modify rqt_plot to handle array topics by adjusting functions like _parse_field_name_and_index, get_plot_fields, and _ros_cb. The goal was to allow rqt_plot to interpret entire arrays as single plottable entities rather than requiring an index for each element.
Despite these efforts, I am still facing challenges in getting rqt_plot to correctly plot entire arrays per cycle. The main issues are ensuring data structure compatibility and correctly handling cycle-based data updates.
Seeking Guidance: I am looking for suggestions or guidance on how to effectively modify rqt_plot for this purpose. Specifically, I need assistance with:
- Correctly modifying rqt_plot functions to handle entire array topics.
- Implementing an efficient and accurate cycle detection and plotting mechanism.
- Any known methods or best practices for handling similar scenarios in rqt_plot.
Any insights or advice from the community would be greatly appreciated, especially from those who have experience in modifying rqt_plot or dealing with similar ROS2 visualization challenges.