0
$\begingroup$

Rosanswers logo

Hi,

has anyone of you ever tried to display a message genereated in RQT Message Publisher on your Android Device?

I managed to publish a message and to display this message.

But when i comment the code of my talker and have the message generated by RQT, i can see the TextView-Node in Node Graph, but there is no Text in my Android Device. I have the same problem when i am playing the messages from a rosbag.

Did someone display a message from a recorded rosbag?


Figured out, that the problem is that the Runnable in the subscriber cant register.

So inside the RosTextview

post(new Runnable() {
        @Override
        public void run() {
            //log.info("I heard: \"" + message.toString() + "\"");
            setText(callable.call(message));
        }

E/UpdatePublisherRunnable﹕ java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "Ubuntu-Test": No address associated with hostname

08-11 10:50:00.882    6403-6460/org.ros.android.android_tutorial_pubsub I/Registrar﹕ Response<Success, Subscribed to [/chatter], [http://Ubuntu-Test:41145/]>
08-11 10:50:00.897    6403-6498/org.ros.android.android_tutorial_pubsub I/DefaultPublisher﹕ Subscriber registered: Subscriber<Topic<TopicIdentifier</chatter>, TopicDescription<std_msgs/String, 992ce8a1687cec8c8bd883ec73ca41d1>>>
08-11 10:50:00.897    6403-6501/org.ros.android.android_tutorial_pubsub I/Registrar﹕ Response<Success, Subscribed to [/topic_lanes_available], [http://192.168.0.199:48304/]>
08-11 10:50:00.897    6403-6497/org.ros.android.android_tutorial_pubsub I/DefaultPublisher﹕ Subscriber registered: Subscriber<Topic<TopicIdentifier</topic_lanes_available>, TopicDescription<std_msgs/Int32, da5909fbe378aeaf85e547e830cc1bb7>>>
08-11 10:50:00.902    6403-6504/org.ros.android.android_tutorial_pubsub I/Registrar﹕ Response<Success, Subscribed to [/chatter], [http://Ubuntu-Test:41145/]>
08-11 10:50:00.902    6403-6426/org.ros.android.android_tutorial_pubsub I/DefaultPublisher﹕ Subscriber registered: Subscriber<Topic<TopicIdentifier</chatter>, TopicDescription<std_msgs/String, 992ce8a1687cec8c8bd883ec73ca41d1>>>
08-11 10:50:00.912    6403-6501/org.ros.android.android_tutorial_pubsub E/UpdatePublisherRunnable﹕ java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "Ubuntu-Test": No address associated with hostname
08-11 10:50:00.917    6403-6515/org.ros.android.android_tutorial_pubsub E/UpdatePublisherRunnable﹕java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "Ubuntu-Test": No address associated with hostname

i exported to 192.168.0.95:4711 and this is where the app is connecting


solved with help from gvdhoorn

export ROS_MASTER_URI=http://192.168.0.95:4711/

export ROS_IP=192.168.0.95

roscore -4711

connecting in the app to http://192.168.0.95

in a new window

doing same export

 rqt

publishing messages
Please clear out any cached data on the android device (app properties, clear all local data). Open new terminals on your desktop. Redo the steps. Your android device should not give you the same "unable to resolve" error if you're not using hostnames.

Originally posted by stefan on ROS Answers with karma: 15 on 2014-08-08

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This looks like a networking issue:

Unable to resolve host "Ubuntu-Test": No address associated with hostname

Your android app is trying to resolve the hostname Ubuntu-Test and it fails.

Have you looked at the ROS network setup wiki page?

In your case, I think you need to at least export ROS_MASTER_URI=http://IP_OF_YOUR_MASTER:11311/. You probably also need to export ROS_IP=IP_OF_YOUR_MASTER. All on your desktop machine.


Originally posted by gvdhoorn with karma: 86574 on 2014-08-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by stefan on 2014-08-11:
export ROS_MASTER_URI=http://IP_OF_YOUR_MASTER:11311/

this is what i did so far

i exported to 192.168.0.95:4711 and ran my roscore with roscrore -p 4711

i see all nodes on my pc and things are working fine, except for this problem

connection is via wlan

Comment by gvdhoorn on 2014-08-11:
Try setting the ROS_IP env var as well.

Comment by stefan on 2014-08-11:
i also tried ro export to http://Ubuntu-Test:11311/

same error

when i have the message generated by a talker in the app, i get the same warning in the log, but the textvie shows the string that is published by the talker

Comment by stefan on 2014-08-11:
i am trying to connect a tablet device via wlan with my pc

IP PC 192.168.0.95

IP Tablet 192.168.0.199

Comment by gvdhoorn on 2014-08-11:
Read the ROS networking wiki page: you need to work around the fact that Ubuntu-Test doesn't resolve to an IP. You can either setup a local DNS server, or export ROS_IP=IP_OF_YOUR_MASTER_PC before starting your master. If you've setup your ROS_MASTER_URI correctly, things should then work.

Comment by stefan on 2014-08-11:
export ROS_MASTER_URI=http://192.168.0.95:4711/

export ROS_IP=192.168.0.95

roscore -4711

connecting in the app to http://192.168.0.95

in a new window

doing same export

rqt

publishing messages

still same error

Comment by gvdhoorn on 2014-08-11:
Please clear out any cached data on the android device (app properties, clear all local data). Open new terminals on your desktop. Redo the steps. Your android device should not give you the same "unable to resolve" error if you're not using hostnames.

Comment by stefan on 2014-08-11:
wooohoooo :) thank you very much

the thing with ROS_IP and clearing all data was the trick

Comment by gvdhoorn on 2014-08-11:
So, this is answered then?

Comment by stefan on 2014-08-11:
yes, thank you

$\endgroup$

Your Answer

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