How to edit a map programmatically?
Hi,
Situation:
i am currently on Ubuntu, using ROS Melodic.
I work with a self built robot, that has a laser scanner.
With the gmapping
package I create a map, that I save with the map_server
package.
I get the mymap.pgm and the mymap.yaml file like expected.
Question:
How can I programatically edit the .pgm
file to have borders? I want to take the path of the robot and use them to draw borders inside the file. Manually doing it with a photo editing program is not a solution (see background info).
Background: I need to develop a mowing robot for outside purposes. I am not indoors with walls, and all sides of the map can be expected open, as the fences might not be detectable (small metal wires or ropes). It is required to drive around the borders of the property once to save the boundaries of the area that is to be mowed. I want to use the path of that drive around and draw it as a line inside the map. But is that actually the smartest way to do it? After some research I haven't found any good solutions.
Thanks for the help.