Robotics StackExchange | Archived questions

Unknown Host Exception Error occurs

I was able to subscribe and publish a message from ros computer to android apps without any errors.When i tried to connect to ros master uri , it connects successfully but i could not received message from ros computer to android apps.

When i saw logcat it says:

UpdatePublisherRunnable: java.lang.RuntimeException: java.net.UnknownHostException: paaila-MS-7A15.

What might be the error ?Could anybody help me?

Asked by bhattarairazu on 2018-10-30 05:50:40 UTC

Comments

Is paaila-MS-7A15 a hostname that can be resolved by the network's DNS server?

If not: that is your problem.

Asked by gvdhoorn on 2018-10-30 15:53:57 UTC

Answers

To debug this problem you can check the topic that you are publishing and subscribing to by using

rostopic info /topic_name

If you see that the address in front of the subscriber node and publisher node is not the same which i am guessing in your case for publisher node will be something like http://paaila-MS-7A:xxxxx and for subscriber node will be an ip-adress then that is your problem. To resolve this, in case you are publishing from a terminal on your pc, try running

export ROS_IP="your machine's ipaddress"

and then the "rostopic pub" command in the same terminal window and your android device subscribing to this topic should receive the message.

Asked by ghost.gd on 2019-04-23 03:16:12 UTC

Comments