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

Revision history [back]

click to hide/show revision 1
initial version

I'm not really sure, if I understood your question, but I share with you what I did, perhaps it helps. I've created a pgn file

A1_map.pgm

with Gimp using a good pixel definition. And then I created a yaml file with the resolution, width, height, etc...

A1_map.yaml:

image: A1_map.pgm
resolution: 0.01
origin: [-10, -10, 0]
occupied_thresh: 0.65
free_thresh: 0.196 # Taken from the Willow Garage map in the turtlebot_navigation package
negate: 0
width:  20
height: 20

where for height and width you put the desired dimension expressed in meters. So opening the map with RViz one side of the map corresponds to 20 cells of RViz (if 1 cell has a dimension of 1 meter)

I'm not really sure, if I understood your question, but I share with you what I did, perhaps it helps. I've created a pgn pgm file using Gimp

A1_map.pgm

with Gimp using a good pixel definition. And then I created a yaml file with the resolution, width, height, etc...

A1_map.yaml:

image: A1_map.pgm
resolution: 0.01
origin: [-10, -10, 0]
occupied_thresh: 0.65
free_thresh: 0.196 # Taken from the Willow Garage map in the turtlebot_navigation package
negate: 0
width:  20
height: 20

where for height and width you put the desired dimension expressed in meters. So opening the map with RViz one side of the map corresponds to 20 cells of RViz (if 1 cell has a dimension of 1 meter)

I'm not really sure, if I understood your question, but I share with you what I did, perhaps it helps. I've created a pgm file using Gimp

A1_map.pgm

with a good pixel definition. And then I created a yaml file with the resolution, width, height, etc...

A1_map.yaml:

image: A1_map.pgm
resolution: 0.01
origin: [-10, -10, 0]
occupied_thresh: 0.65
free_thresh: 0.196 # Taken from the Willow Garage map in the turtlebot_navigation package
negate: 0
width:  20
height: 20

where for height and width you put the desired dimension expressed in meters. So opening the map with RViz one side of the map corresponds to 20 cells of RViz (if 1 cell has a dimension of 1 meter)

Both files are copied into the main folder of my package under

maps/