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

Eclipse and Android Tutorial PubSub Errors

asked 2012-04-03 08:27:59 -0500

Brainmuck gravatar image

updated 2014-01-28 17:11:51 -0500

ngrennan gravatar image

I have been battling through installing a development environment to use rosjava to communicate with a robot (pc) from an android device. I am relatively new to ROS and Android programming.

I have managed to finally get pubsub installed on my phone and functioning (from the command line), thanks to a lot of tidbits from everyone on Ros answers.

I now seem to be having issues getting the project to run from an eclipse environment. I created a new Android Project and created from existing source, pointing to android_tutorial_pubsub.

This left me with some unresolved errors.

My first attempt to fix this I added all the jars I could from android_gingerbread and rosjava until the errors were gone. I was then able to get the app on my phone but it would fail every time I tried to run it. I did notice that under properties->android the android_gingerbread reference had a big red X next to it.

My next attempt was remove all the library references and to create a new android project from existing source and point to android_gingerbread to bring it into eclipse. This removed all the errors and resulted in a green check mark beside the android_gingerbread reference.

But now when I try to compile I simply get a java heap error, crashing eclipse. I've increased the size of the heap but it just keeps happening.

Is importing android_gingerbread as an Android project not the right way to import it into eclipse? Is there another environment that I can use to modify the pubsub code?

edit retag flag offensive close merge delete

Comments

I pulled the new files and compiled the rosjava_core fine. But the Android_core won't compile now. It fails on UpdateProject. It can't seem to find the command android in the folder to 'update project' But if I call android from the directory it opens the SDK manager fine. So the path is there.

Brainmuck gravatar image Brainmuck  ( 2012-04-04 06:58:17 -0500 )edit

Ok now parts of android_core compile, had to add -target 1 to the gradle build file to target android-10 based on my target list. I still get a java heap problem when trying to run in eclipse though. android_honeycomb_mr2 won't compile do I need it for pubsub?

Brainmuck gravatar image Brainmuck  ( 2012-04-04 09:19:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-04-03 22:09:41 -0500

damonkohler gravatar image

There were some significant changes in the past couple days that left android_core broken. However, android_core and its documentation have been updated as of today. I suggest pulling and trying again.

http://docs.rosjava.googlecode.com/hg/rosjava_core/html/building.html http://docs.rosjava.googlecode.com/hg/android_core/html/building.html

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-03 08:27:59 -0500

Seen: 570 times

Last updated: Apr 03 '12