ROS maps generation from pdf files
Hello all,
I have a blue print of my of my building in a pdf file. How can i generate a map from this pdf file so i can use it for navigation?
Thanks
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hello all,
I have a blue print of my of my building in a pdf file. How can i generate a map from this pdf file so i can use it for navigation?
Thanks
if you use the OccupancyGrid (according to the map_server node) in order to navigate the robot ,
you might need the map in PGM format and a description file in YAML ,with the data on the blueprint transformed into a grid (in fact , an array) which contains occupancy value.
=> You may convert the pdf into image file like bitmap and recreate the map by drawing things manually (eg. wall , static obstacle , free area)
[Make sure that the resolution of the converted image is measured , it must be written in the description file.]
From image editing app like photoshop , you need to draw everything according to color definition .
[Black = Occupied , White = Free , Dark Grey = Unknown Area]
Map examples can be found easily on many repos as well as description file(YAML) ~ :D
Thanks for the reply. I converted pdf file into a png format by taking a screenshot and tried loading it into rviz and stage. But i am having issues with dimensions i.e robots moves faster in stage than in rviz which is creating problem. do you have any idea how i can solve this?
Implementation might be done by
Convert PDF to PNG -> Define Scale size of the pixel cell compared to the real world -> Re-Paint Area (Wall , Free , Unknown) -> Export the image file and description file.
Some PDF to Image Library and OpenCV can achieve this , but it would be the hard way :(
Asked: 2016-10-06 23:29:31 -0600
Seen: 660 times
Last updated: Oct 07 '16