|
TinyRobotics
|
Utility class for serializing and deserializing grid maps in CSV format. More...
#include <MapSerializer.h>
Public Member Functions | |
| size_t | write (Map &map, Print &out) |
| size_t | read (Map &map, Stream &in) |
Utility class for serializing and deserializing grid maps in CSV format.
The GridMapSerializer class provides methods to write a grid map to a Print object (such as Serial) and to read a grid map from a Stream object. It is designed to work with map types that provide the following interface:
The serialization format is:
This format is compatible with external tools and spreadsheets for easy inspection and editing.
Example: GridMap x:10, y:10, resolution=0.1 0,0,0 0,0.1,1 ...
| Map | The map type to serialize/deserialize (e.g., GridMap) |
| StateT | The cell state type (e.g., float, int, CellState) |
| T | The numeric type for coordinates (e.g., float) |