ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

MasterChooser cannot find roscore on different PCs on the same network

asked 2017-10-03 00:45:48 -0500

Nick30075 gravatar image

updated 2017-10-03 00:46:28 -0500

I'm working with an android app that runs a node that publishes a ros message to use elsewhere. For some unknown reason, MasterChooser only connects to roscore when it's running on one of two machines. If roscore is running on any other machine on the same network, MasterChooser cannot connect to it. We tried assigning a static IP to one of them in case the router was doing anything weird but nothing has helped.

What could be causing this/how do we fix it?

edit retag flag offensive close merge delete

Comments

Please check you have a working DNS setup for all involved hosts (ie: all hosts can ping each other by name, not IP).

gvdhoorn gravatar image gvdhoorn  ( 2017-10-03 03:02:35 -0500 )edit

There does appear to be an issue with the tablet's DNS. I'll have to talk to our IT guy about it. Thanks.

Nick30075 gravatar image Nick30075  ( 2017-10-03 12:22:33 -0500 )edit

We've set up the tablet properly, gave it a static IP, and tried two different DNS servers. The issue persists. Any ideas?

Nick30075 gravatar image Nick30075  ( 2017-10-05 14:57:55 -0500 )edit

I'm not sure how rosjava does this internally, but with "working DNS setup" I meant that all your hosts can resolve each others names. Is that true for the tablet and all potential master machines?

gvdhoorn gravatar image gvdhoorn  ( 2017-10-06 02:36:49 -0500 )edit

We tried it with two DNS servers and it's true one way (master can resolve tablet name but tablet cannot resolve master name). It looks like we might have to screw with the tablet to get root on it. I'll talk to our OS guy and see what he can do.

Nick30075 gravatar image Nick30075  ( 2017-10-06 12:56:39 -0500 )edit

I don't think it should be that difficult: DNS servers are external to your device anyway and the only thing that is needed is for the tablet to be able to resolve the DNS name of the master machine to an IP and vice-versa. The same for the master machine.

But this is only important if this is ..

gvdhoorn gravatar image gvdhoorn  ( 2017-10-06 13:51:03 -0500 )edit

.. the actual problem.

It's easy to get overly focused on one particular aspect. We're not even sure this is the problem.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-06 13:52:12 -0500 )edit

Yeah, we tried it with google's DNS server and our router's own DNS server and it didn't work. I read in a generic android thread that the device needs other devices set in its own /etc/hosts for DNS to work properly. We're going to try that to diagnose this but it won't be until next week.

Nick30075 gravatar image Nick30075  ( 2017-10-06 14:52:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-10 13:57:31 -0500

jubeira gravatar image

As @gvdhoorn points out in the comments, this sounds like a typical networking problem. Are you using hostnames or IP addresses in the master chooser? From the network point of view, you need your Android device to be able to resolve the address of the master you are trying to connect to.

I'd suggest you to see the console output using adb to know more about your problem; it's a bit hard to tell where the problem is without more information. To do so, install adb, and run adb logcat from your terminal, with the Android device connected via USB.

Note that the USB has to be enabled for debugging purposes in the Android device to do this: https://www.kingoapp.com/root-tutoria... .

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-03 00:45:48 -0500

Seen: 288 times

Last updated: Oct 10 '17