Ask Your Question

pgm resolution problem

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

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 -0500

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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

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

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

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: 2014-05-16 08:38:00 -0500

Seen: 728 times

Last updated: May 16 '14