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

Get OutOfMemoryError when using OccupancyGridLayer to display map

asked 2012-07-09 10:02:52 -0500

ira gravatar image

Hi all,

I run my program on a real device with 1GB memory. I tried to use OccupancyGridLayer to display map message i got from robot. However, after about 10s processing, I got OutOfMemoryError and the app was forced to stop. Does anyone have the same problem? Is there any way to solve this problem?

Thanks a lot!

edit retag flag offensive close merge delete

Comments

1

Could you include the map parameters for the map you trying to display (size in x and y, pixels/meter, etc)? Basically the MapMetaData that goes along with the OccupancyGrid message you are trying to display.

Eric Perko gravatar image Eric Perko  ( 2012-07-09 10:12:02 -0500 )edit

Hi, thanks for the reply. Here is the data:
width = 428 height = 580 resolution = 0.025 map load time = 0:0

ira gravatar image ira  ( 2012-07-09 21:05:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-07-11 21:15:51 -0500

damonkohler gravatar image

I'm in the process of addressing this issue. See http://code.google.com/p/rosjava/issues/detail?id=131

edit flag offensive delete link more
0

answered 2012-07-09 22:08:59 -0500

Lorenz gravatar image

Well, I guess your map is just too big. Its size will be about 9MB. Is your map really that big? If not, look at the patch attached to this ticket.

If you need the map just for visualization, you could implement a proxy that compresses it, e.g. as a PNG file. You can find some code doing this in the rosjava project, repository google, package name compressed_visualization_transport. This solution would probably require some work though.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-09 10:02:52 -0500

Seen: 328 times

Last updated: Jul 11 '12