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

How to draw a map on android device?

asked 2013-10-25 21:53:26 -0600

grzebyk gravatar image

updated 2013-10-26 16:18:34 -0600

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

edit retag flag offensive close merge delete

Comments

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.

Eric Perko gravatar image Eric Perko  ( 2013-10-26 07:41:30 -0600 )edit

thank you for your comment. I edited my question.

grzebyk gravatar image grzebyk  ( 2013-10-26 16:19:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-10-26 16:37:24 -0600

Chad Rockey gravatar image

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.

edit flag offensive delete link more

Comments

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

grzebyk gravatar image grzebyk  ( 2013-10-27 20:51:50 -0600 )edit

Please ask in another question and include source code so the new problem can be easily searched for.

Chad Rockey gravatar image Chad Rockey  ( 2013-10-27 20:52:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-25 21:53:26 -0600

Seen: 1,495 times

Last updated: Oct 26 '13