0
$\begingroup$

Rosanswers logo

I want to display a map on android tablet. I have a gapping node which publishes a "map" topic. To display it I followed make_a_map tutorial from android apps, that can be found on rosjava github. Unfortunately instead of displaying a map, application crashes due to out of memory problem. What am I doing wrong? How can I access OccupancyGrid message and display its content on my tablet?

Map info taken from rostopic echo map_metadata:

resolution: 0.0500000007451 width: 4000 height: 4000

My tablet is Samsung Galaxy note 10.1 which has 2GB RAM, 1,4 GHz quad core CPU and runs on Android 4.1


Originally posted by grzebyk on ROS Answers with karma: 141 on 2013-10-25

Post score: 1


Original comments

Comment by Eric Perko on 2013-10-26:
How large is your map? I suggest you edit your question to include the map metadata info (e.g. rostopic echo /map/info ) as well as maybe some details about what type of tablet you are displaying on. Out-of-memory issues might be completely reasonable with a large map and a low-memory device.

Comment by grzebyk on 2013-10-26:
thank you for your comment. I edited my question.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You probably need to use a smaller map. Android has some known limitations on texture size. Here are some links to help you figure out what's the maximum for your device:

http://stackoverflow.com/questions/4527695/how-an-i-find-the-maximum-texture-size-for-different-phones

http://stackoverflow.com/questions/8573178/limitation-on-texture-size-android-open-gl-es-2-0

The easiest workaround is to resize the map before drawing it.


Originally posted by Chad Rockey with karma: 4541 on 2013-10-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by grzebyk on 2013-10-27:
Yeah, map was too big. Problem disappeared. Thank you but right now it seems that it doesn't go into draw method and I have no idea why...

Comment by Chad Rockey on 2013-10-27:
Please ask in another question and include source code so the new problem can be easily searched for.

Comment by grzebyk on 2013-10-27:
Done. It's here: http://answers.ros.org/question/94946/why-occupancygridlayer-class-doesnt-access-draw-method/

$\endgroup$

Your Answer

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