Ask Your Question
1

publish range data from android app

asked 2012-07-15 08:56:53 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi,

I am trying to publish range data (Fake) from Android application to the PC.

  • I have successfully written a rosjava package rosjava_range which is nothing but a publisher and subscriber of the message type "sensor_msgs.Range._TYPE".

  • As per instruction I created my new application by copying android_tutorial_pubsub.

  • I tried to modify the build.gradle file to add my own package (class)

dependencies {

compile 'ros.rosjava_core:rosjava_tutorial_pubsub:0.0.0-SNAPSHOT' compile 'ros.rosjava_core:rosjava_range:0.0.0-SNAPSHOT'

}

  • And then made changes in the MainActivity.java file to import the following class.

import org.ros.rosjava_tutorial_pubsub.Talker;

import org.ros.rosjava_range.Range_Talker;

I was not able to build successfully. I get the following error:

-post-package:

-do-debug: [echo] Library project: do not create apk... [propertyfile] Updating property file: /home/suraj/my_workspace/android_core/android_gingerbread_mr1/bin/build.prop [propertyfile] Updating property file: /home/suraj/my_workspace/android_core/android_gingerbread_mr1/bin/build.prop [propertyfile] Updating property file: /home/suraj/my_workspace/android_core/android_gingerbread_mr1/bin/build.prop [propertyfile] Updating property file: /home/suraj/my_workspace/android_core/android_gingerbread_mr1/bin/build.prop

-post-build:

debug:

BUILD SUCCESSFUL Total time: 1 second :android_tutorial_range:deployLibs

FAILURE: Build failed with an exception.

  • What went wrong: Could not resolve all dependencies for configuration ':android_tutorial_range:compile'.

    Could not find group:org.ros.rosjava_range, module:rosjava_range, version:0.0.0-SNAPSHOT. Required by: ros.android_core:android_tutorial_range:0.0.0-SNAPSHOT

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

BUILD FAILED

Total time: 2.453 secs

What am I missing here? Do I have to add the path to my rosjava_range package?

Thanks for the help.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-07-22 10:06:28 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

The solution was very simple. Instead of linking it from another package you have to add those files in the src folder and make sure that you import it ( import org.ros.rosjava_range.Range_Talker; ) in the MainActivity.java file.

edit flag offensive delete link more
0

answered 2012-07-20 08:06:11 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I was wondering if anyone had tried this before. Or am I doing something completely wrong?

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-07-15 08:56:53 -0500

Seen: 987 times

Last updated: Jul 22 '12