Ask Your Question
0

Simple Android app communication with ROS Kinetic

asked 2019-05-29 07:09:27 -0500

splash99 gravatar image

Hello,

I'm searching for a simple way, so that my android application can send and receive messages from my Laptop via ROS Kinetic. Simple double or string variables are enough. I found lots of tutorials but they are not working for me or to complicated for me or not with ROS kinetic. I hope you guys can help me.

Best regards

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-05-30 12:57:39 -0500

jubeira gravatar image

updated 2019-06-06 08:52:22 -0500

Hi @splash99,

Take a look at https://wiki.ros.org/android. There are already sample apps out there showing how to do a simple pubsub: https://github.com/rosjava/android_co.... I'd suggest you to compile that application and use it as a starting point for your purposes.

Hope it helps!

EDIT: Check this issue https://github.com/rosjava/rosjava_bu... for a workaround to create an Android project. Note that the command line tool just creates a template for a new project, but nothing else that is very sophisticated. You can do the same editing an existing project instead of starting from scratch.

edit flag offensive delete link more

Comments

I lost the track on this count of tutorials.. Could you maybe help me? I just need one tutorial that I can walk through, but every tutorial I find, is deprecated at any point and I cant fix this.. I just want a really simple connection betwenn my android tablet and a ros master on a pc that can send and receive simple double values.

splash99 gravatar imagesplash99 ( 2019-06-06 09:54:16 -0500 )edit

Just build pubsub tutorial: https://github.com/rosjava/android_co....

In two steps:

That should build android_tutorial_pubsub apk for you. Install it to your Android device using adb and that should be it.

jubeira gravatar imagejubeira ( 2019-06-06 10:01:27 -0500 )edit

when i try to build it it says:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.2/usergu...

splash99 gravatar imagesplash99 ( 2019-06-06 10:07:09 -0500 )edit

Is that a warning or an error? Look for an APK file inside your source directory, it should be there already.

jubeira gravatar imagejubeira ( 2019-06-10 06:28:48 -0500 )edit

it's an error. I cant build. It says :

Build failed with exception

  • Where: Build file '/home/USER/android_core/android_acm_serial/build.gradle' line: 21 US
  • What went wrong: A problem occurred evaluating project ':android_acm_serial'.

    Failed to apply plugin [id 'com.android.library'] Minimum supported Gradle version is 5.1.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in /home/USER/android_core/gradle/wrapper/gradle-wrapper.properties to gradle-5.1.1-all.zip

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.2/usergu...

splash99 gravatar imagesplash99 ( 2019-06-11 04:57:48 -0500 )edit

ok, i started the apk now on my emulated android device. And I can connect to the Ros Master, which runs on the same Laptop as the emulator. But how can I now send and receive messages? Is there any explanation of the pubsub app?

splash99 gravatar imagesplash99 ( 2019-06-11 07:02:01 -0500 )edit

That must be a local problem. Try an online search for that error; e.g: https://stackoverflow.com/questions/5...

jubeira gravatar imagejubeira ( 2019-06-11 10:05:42 -0500 )edit

@jubeira btw thanks for your help. I solved the error but i dont understand how this application is working. Is there any explanation or something that explains the tutorial?

splash99 gravatar imagesplash99 ( 2019-06-12 04:05:54 -0500 )edit
0

answered 2019-06-06 08:40:33 -0500

splash99 gravatar image

updated 2019-06-06 08:52:33 -0500

Hi @jubeira,

thanks for your answer. When I start your tutorial it says after a few steps:

NOTE: Creating Android projects from the command line won't be supported with Build tools > 25.0.2. The tool supporting this command in Android's SDK has been officially deprecated, so to start a new project Android Studio has to be used.

Do you maybe have another Tutorial, that I can use?

Every Tutorial ends up in some tutorials for indigo like this:

http://wiki.ros.org/android/Tutorials...

It starts as tutorial for kinetic but the next site is indigo. Isnt there any tutorial which is only for kinetic?

edit flag offensive delete link more

Comments

@splash99 please note that the idea behind ROS answers is not a forum; please use comments to ask for clarifications or open a new question if necessary; the answers section should only contain answers. I'll edit my answer with a workaround for that.

jubeira gravatar imagejubeira ( 2019-06-06 08:49:25 -0500 )edit

@jubeira oh ok sorry.

splash99 gravatar imagesplash99 ( 2019-06-06 09:32:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-05-29 07:09:27 -0500

Seen: 107 times

Last updated: Jun 06