Passing large data messages
Hi,
I would like some suggestions or guidelines for the following design problem. I have a ROS node which maintains a fairly large data structure (a 3D map). I would like to publish it efficiently, so I can create independent packages that visualize or process the data. I can publish ROS messages as shared pointers using the nodelet architecture, but that still leaves the problem of converting the map structure to a ROS message. Translating the map structure to a ROS message is undesirable for two reasons
- I need to spend time copying data out of the structure and into the ROS message
- The native map is built using some data structures not available to the ROS message, which can only use vectors.
An alternative I can think of is to directly maintain the map data in my program as a ROS message, so no translation would be required. However, again I have the problem that the ROS messages only allow for vectors, so I'd be restricted in how I design the structure.
Is my reasoning correct? Does anyone have a good solution to this problem?