ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS maps generation from pdf files

asked 2016-10-06 23:29:31 -0600

krishna43 gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-10-07 00:54:23 -0600

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

edit flag offensive delete link more

Comments

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?

krishna43 gravatar image krishna43  ( 2016-10-07 01:12:52 -0600 )edit

Also, if you have any tutorials on how to create maps using pdf files, can you point me in right direction?

krishna43 gravatar image krishna43  ( 2016-10-07 01:23:16 -0600 )edit

I'm not sure , it might be the resolution of the map .

C3MX gravatar image C3MX  ( 2016-10-07 02:11:27 -0600 )edit

As far as I know ( 1-year experience ) , There is no way to do the conversion from PDF to PGM file at the moment.

C3MX gravatar image C3MX  ( 2016-10-07 02:12:32 -0600 )edit

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 :(

C3MX gravatar image C3MX  ( 2016-10-07 02:16:45 -0600 )edit

Thanks, mate!

krishna43 gravatar image krishna43  ( 2016-10-07 12:43:56 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-06 23:29:31 -0600

Seen: 660 times

Last updated: Oct 07 '16