It is very difficult for robots to navigate in unknown environments, especially if their motion optimality is of concern. A SLAM approach can be used to obtain a map to perform optimal planning for robot motion. However, this generally requires time, effort and resources to navigate through the environment and record the surroundings with sensor data. An alternative is to create a prior map based on the blueprints of the buildings the robot would be deployed in. But this information is rarely available and accesible. On the other hand, evacuation plans and similar graphical representations of the building layouts are freely displayed for everyone. Taking an image of such a layout and transforming it into a representation of obstacles can allow robots to create initial navigation plans to a given goal with prior information. This program extracts the structured obstacle and wall data from such images and creates a ROS map, based on human operator inputs.
Dependencies:
- Python 3.6
- OpenCV
- SciPy
Results
Original image on the left and the resulting output on the right. Identifying features have been removed for some images in this repository, but they are present when performing SWEEP.
Result 1:
Result 3:
Result 8:
Result 11:
Publish the map on the map server (replace "map_name" with the name of the map):
rosrun map_server map_server map_name_ros.yaml
Visualize in Rviz by adding a map and setting the /map topic