0
$\begingroup$

Rosanswers logo

I am using Kinetic and Ubuntu 16.04.6 LTS, I am trying to upload a map file for map_server and use it for navigation and amcl localization, but it is really big, 25500 x 5300 pixels (.pgm). The map_server is not starting and shows this message:

[ERROR] [1556905481.419883442]: failed to open image file "/home/dev/src/robot/navigation/maps/bigger_map.pgm": Out of memory

Is possible to use a map with a big number of pixels or I need to reduce the number of pixels to work well? Is it depends on computer memory RAM?

I have tried to use in .png file format, but the message was the same.


Originally posted by Lucas Marins on ROS Answers with karma: 71 on 2019-05-03

Post score: 0


Original comments

Comment by gvdhoorn on 2019-05-04:
I'm not into navigation at all, but 25500 x 5300 == 135150000 bytes (approx 128MB). And that is just if each cell only occupies a single byte (which is probably not the case). High resolution maps could be an issue. Do things work if you subsample the map? Otherwise I'd suggest to search for some previous Q&As about map resolution and related problems.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I have found out that the map_server uses SDL_image to read image files and dimensions are limited to 8192 x 8192 == 67108864 pixels, approximately half of my map. There is also a one-year open issue in ros-planning GitHub repository. https://github.com/ros-planning/navigation/issues/635 Until now, the best solution is to divide the map to some small maps or sections and write a map switcher node to manage it.


Originally posted by Lucas Marins with karma: 71 on 2019-05-07

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.