ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to load a map(.png) to ros and make an occupancy grid?

asked 2019-11-06 03:29:32 -0600

Parth2851 gravatar image

updated 2022-01-22 16:10:08 -0600

Evgeny gravatar image

I have to upload this map on roscpp and make an occupancy grid. I can use opencv as well.

edit retag flag offensive close merge delete


You can use map_server.

Choco93 gravatar image Choco93  ( 2019-11-06 05:32:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-06 08:02:06 -0600

Parth2851 gravatar image

Create a .yaml file using text edit in the format

image: map.png

resolution: 0.1

origin: [0.0, 0.0, 0.0]

occupied_thresh: 0.65

free_thresh: 0.196

negate: 0

You can read more here

Then, run roscore on a new terminal and then run

rosrun map_server map_server map.yaml

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2019-11-06 03:29:32 -0600

Seen: 1,593 times

Last updated: Nov 06 '19