Is there a package which allows you to convert .pgm with .yaml to graph data?
I have a 2D floor map generated using SLAM which provides .pgm and .yaml files. Is it possible to convert the file to a 2D graph where we can store information about the the x, y coordinate of nodes with degree>2 and edges details (ie which node is connected to which other nodes). We can assume a global coordinate system. The floor structure can be similar to the one illustrated in the link: http://wiki.ros.org/tuw_voronoi_graph
For example if we find a white region with degree=3, we name it as N4 and we write its x coordinate, y coordinate and edges such as N4-N5, N4-N7 and N4-N8.
It can probably be broken down into two steps: 1. Convert all the paths to lines and generate a line based graph. 2. Find intersections (degree>2), note their coordinates and update the edges.