Hi,
the last days i tried to run android_tutorial_pubsub and ran into several problems.
First i had the problem that
NodeConfiguration nodeConfiguration = NodeConfiguration.newPrivate();
was executed, which won't let you connect from a different device.
So i changed it into something like NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress());
This gives you the first network device which is not a loopback device, but it does not check what device it is. For me it gave me vsnet0 instead of wlan0. So whenever i tried to connect to the subscribed topics or only executed rostopic info /chatter
it would complain about not being able to connect.
This is somehow expected as the ip address of vsnet0 is not in the same subnet as wlan0 and my other computers which run ROS.
I have now hardcoded the ip address for wlan0 from my android phone, but this is only usefull for my development environment, as i can't expect to have the same ip at other places.
The question now is how can i select the network device i want to use instead of just getting the first nonLoopback device?
Any idea or advice would be helpfull. Thank you.
Greetings, Markus
Originally posted by bajo on ROS Answers with karma: 206 on 2012-10-08
Post score: 0
Original comments
Comment by Lorenz on 2012-10-08:
Maybe that's a bug in rosjava. Consider filing a ticket on the corresponding bug tracker. To come up with a workaround, I suggest you have a look at the source code of InetAddressFactory: http://mediabox.grasp.upenn.edu/roswiki/doc/api/rosjava/html/InetAddressFactory_8java_source.html