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

Creating map with paint(or any other image editor)

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

knsjoon gravatar image

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

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

Comments

What tutorial?

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

1 Answer

Sort by ยป oldest newest most voted
2

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

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. [ https://youtu.be/ySlU5CIXUKE ]

edit flag offensive delete link more

Question Tools

2 followers

Stats

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

Seen: 2,122 times

Last updated: May 13 '19