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

pgm resolution problem

asked 2014-05-16 08:38:00 -0600

Ico gravatar image

SBPL Lattice planner has a map resolution 0.025, and I have a map with a resolution of 0.05. How can I change my map .pgm file in a resolution of 0.025?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-05-16 08:49:39 -0600

ahendrix gravatar image

You can open your pgm in an image editing program such as gimp or photoshop, double the resolution, and save it.

You should also be able to resize it using imagemagik tools such as mogrify or convert.

If you have a yaml file that goes with your pgm map, you should edit the resolution there; otherwise, just pass the new resolution to the map_server on startup.

edit flag offensive delete link more


@Ico and @ahendrix ,i think the map resolution 0.05 represents 0.05m/cell,how to use gimp to change the map resolution is 0.025? in my case,my map.pgm is (576,512),does change the map.pgm size (1152,1024) can change the resolution??

jxl gravatar image jxl  ( 2015-03-07 02:14:49 -0600 )edit

The resolution in your map yaml file specifies how the map is interpreted (how big a cell is). The image size (in pixels) multiplied by the resolution determines the final map size (in meters).

ahendrix gravatar image ahendrix  ( 2015-03-07 14:31:29 -0600 )edit

@adhendrix,thank you ,does you mean that if i want to double the map resolution , i can just individually reduce the length and width of the image by half ?

jxl gravatar image jxl  ( 2015-03-08 01:15:37 -0600 )edit

No. Please ask a new question and give a specific example of what you're trying to do. Include the map.yaml and the pgm file you're trying to resize.

ahendrix gravatar image ahendrix  ( 2015-03-08 01:51:19 -0600 )edit

Thanks , i'm sorry ,it is my question link

jxl gravatar image jxl  ( 2015-03-08 07:02:15 -0600 )edit

Question Tools



Asked: 2014-05-16 08:38:00 -0600

Seen: 1,164 times

Last updated: May 16 '14