Rosanswers logo


I have installed the pubsub android tutorial on an android device and have it connect to an external roscore in order to have a talker/listener system between the android device and the computer where roscore runs.

When a Talker on the computer publishes data on the "chatter" ros topic, this data is seen on the android device in the rosTextView node.

However, when a Talker on the android device publishes data on the "chatter" ros topic, this data is seen in the rosTextView node of the android device but it dos not appear using "rostopic echo /chatter" on the computer. However, the data published by the talker should be seen on the computer also.

Would you know how to fix this?

I thank you in advance.


P.S. Here is the main source code of the application if it can be of any help: https://code.google.com/p/rosjava/source/browse/android_tutorial_pubsub/src/org/ros/android/tutorial/pubsub/MainActivity.java?spec=svn.android.10e4ad9b5746bead9376295165247bec770bdbc2&repo=android&name=10e4ad9b57&r=10e4ad9b5746bead9376295165247bec770bdbc2

Originally posted by Imré on ROS Answers with karma: 26 on 2011-12-01

Post score: 0


1 Answer 1


Rosanswers logo

Line 76 of the example says:

NodeConfiguration nodeConfiguration = NodeConfiguration.newPrivate();

That node can only make use of the loopback interface. Try:

NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress().toString(), masterUri);

Originally posted by damonkohler with karma: 3838 on 2011-12-04

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by Elvish Champion on 2014-04-19:
With that I am able to see the "Hello world! #" but I am unable to see results for rostopic echo /chatter . May I ask why is that happening?

Comment by stefan on 2014-08-05:
has anyone of you tried to change the thext in talker.java? What do i have to do to see that changes in the android app? e.g. changing "hello world" to "changed text"


Your Answer

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