|
TinyRobotics
|
Utility class for serializing and deserializing path maps (sequences of segments) in CSV format. More...
#include <MapSerializer.h>
Utility class for serializing and deserializing path maps (sequences of segments) in CSV format.
The PathMapSerializer class provides methods to write a path map (a sequence of segments, each with a 'from' and 'to' coordinate, a cost, and a directed flag) to a Print object (such as Serial) and to read a path map from a Stream object. It is designed to work with map types that provide:
The serialization format is:
This format is compatible with external tools and spreadsheets for easy inspection and editing.
Example: 0,0,1,1,2.5,1 1,1,2,2,1.0,0 ...
| MapT | The map type to serialize/deserialize (must support segment access and addSegment) |
| CoordinateT | The coordinate type for segment endpoints (e.g., Coordinate<float>) |