Measuring map size memory requirements
Hi all,
I am working on a way to compress the memory requirements of large scale mappings (the SLAM kind of mapping). To measure the mileage of my improvements, I need to quantify the memory requirements needed for the mapping. One way is to save the map using the map_saver package, e.g. rosrun map_server map_saver -f mymap_name
. And then check the file size manually. Additionaly, I use a topological mapping, which consists of nodes that carry certain properties (e.g. location, edges connected, some observed properties of the place where the node is created, etc.). I could store this to a text file, using some xml or csv kind of formatting. Then I could manually measure that file size too, and add those two file sizes up.
Although that solution would work, it is not very elegant. And it involves manual checking of the files sizes (maybe I could write some bash script for this?). Is there any way to quantify the actual memory usage of the mappings in a more elegant manner (e.g. online instead of using an offline export), for example by quantifying the memory used by a certain topic, parameter or node? For example, how could I check the size of the map that is served in the /map topic?
Any tips on how to automatically check file sizes using bash (in case of file exports) are also welcome...
Many thanks in advance!
Cheers, Koen