Closed marc-hanheide closed 8 years ago
you need to look at the YAML definition of the map to find out resolution and origin of the map. This needs to be loadable via menu or tool button.
load yaml like this:
with open("/home/lcas/Downloads/arena.yaml", 'r') as stream:
print(yaml.load(stream))
This will return a structure like this:
{'free_thresh': 0.196,
'image': 'arena.pgm',
'negate': 0,
'occupied_thresh': 0.65,
'origin': [-5.199999999999989, -5.1499999999999915, 0.0],
'resolution': 0.05}
Then load the image map that is given there as QPixmap
take #7 as inspiration.
QPixmap was not loading the so i had to use QImage to load the image which allows for more properties of the object to be accessed e.g size but still trying to figure out how to access these properties so i can try convert the pixels into metrics
This is done
You need to set the background of your editor from an actual metric map. @jailander to provide one... Also read the YAML information to be able to transform pixel coordinates into metric map coordinates