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

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

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

Parth2851 gravatar image

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

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

Comments

You can use map_server.

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

1 Answer

Sort by ยป oldest newest most voted
2

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

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

Question Tools

Stats

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

Seen: 2,083 times

Last updated: Nov 06 '19