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

Creating map with paint(or any other image editor)

asked 2019-05-11 19:27:25 -0600

knsjoon gravatar image

updated 2019-05-13 02:39:24 -0600

Hello, I am following this one tutorial with turtlebot and creating a map by keyboard teleoperation has been very tough for me as the maps were getting messed up and tangled.

I am wondering if it is possible to draw a map myself on any image editor program(such as photoshop, paint) to create my own map.

Can someone guide me through how to do this by changing YAML file and other files?

edit retag flag offensive close merge delete


What tutorial?

jayess gravatar image jayess  ( 2019-05-11 20:54:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-13 03:20:07 -0600

Veera Ragav gravatar image

You can use any image editor. I would recommend using GIMP in Ubuntu. After drawing your map, export it to .png or .pgm format. The tricky thing is to populate the YAML file that contains metadata of the map. The fields in the YAML file are,

  • image: yourimagename.png
  • resolution: 0.1 (this is the distance/pixel value. 0.1 refers to a distance of 0.1m between adjacent pixels)
  • origin: [0, 0, 0] (this is the coordinate of the lower left pixel in your image (x,y,yaw))
  • occupied_thresh : 0.9 (Pixels with occupancy probability greater than this threshold are considered completely occupied.)
  • free_thresh :0.1 (Pixels with occupancy probability less than this threshold are considered completely free.)
  • negate : 0 (Whether the white/black free/occupied semantics should be reversed (interpretation of thresholds is unaffected))

There is a workaround to do this in a easy way. Checkout this YouTube video. [ ]

edit flag offensive delete link more

Question Tools



Asked: 2019-05-11 19:27:25 -0600

Seen: 1,975 times

Last updated: May 13 '19