0
$\begingroup$

Rosanswers logo

I build rosjava pubsub tutorial without error. and I can run the PubSubTutorial on the AVD. It seems working well. but I don't know it is actually publishing the topic.

I ran the roscore in ubuntu PC, but PubSubTutorial is not trying to connect to roscore in PC. MainActivity Manifest has internet permission.

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

Should I run the roscore(rosjava)? the DEFAULT_MASTER_URI is "http://localhost:11311/" was configured by NodeRunner.createDefault() function.

[2011-06-23 22:41:19 - MainActivity] Android Launch!
[2011-06-23 22:41:19 - MainActivity] adb is running normally.
[2011-06-23 22:41:19 - MainActivity] Performing org.ros.tutorials.pubsub.MainActivity activity launch
[2011-06-23 22:41:19 - MainActivity] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'scv'
[2011-06-23 22:41:21 - MainActivity] Application already deployed. No need to reinstall.
[2011-06-23 22:41:21 - MainActivity] Starting activity org.ros.tutorials.pubsub.MainActivity on device emulator-5554
[2011-06-23 22:41:22 - MainActivity] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.ros.tutorials.pubsub/.MainActivity }

How can I use this tutorial? Please give me a answer. Thank you.


Originally posted by hughie on ROS Answers with karma: 71 on 2011-06-23

Post score: 1


Original comments

Comment by damonkohler on 2011-06-23:
Could you clarify your question? You say that it built and runs fine on the AVD. Your logcat looks fine as well.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

To connect to a roscore that is running in an AVD, you'll need to use adb forwarding. See http://developer.android.com/guide/developing/tools/adb.html#forwardports

For example:

adb forward tcp:11311 tcp:11311

That will forward all TCP connections to port 11311 on your host to your AVD on port 11311.


Originally posted by damonkohler with karma: 3838 on 2011-06-27

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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