0
$\begingroup$

Rosanswers logo

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?


Originally posted by Ico on ROS Answers with karma: 23 on 2014-05-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ahendrix with karma: 47576 on 2014-05-16

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by jxl on 2015-03-07:
@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??

Comment by ahendrix on 2015-03-07:
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).

Comment by jxl on 2015-03-08:
@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 ?

Comment by ahendrix on 2015-03-08:
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.

Comment by jxl on 2015-03-08:
Thanks , i'm sorry ,it is my question link

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.