Somehow network setup with ROS Android seems to confuse many users.
We'll need some more information:
- Real Android device, or simulator
- Version of ROS, ROS Android & Android itself
- Network setup (LAN, WAN, etc)
Also, just to be clear: are you trying to subscribe on your Android device to topics published by your PC, or is the PC trying to subscribe to topics published by your Android device?
Edit: assumptions:
- you're using a physical Android device - not the simulator
- and both your ROS pc and the Android device are on the same network (a simple home LAN)
- you have checked that the Android device and the ROS pc have working IP connectivity
- you checked the Android application and that it is able to connect to ROS masters other than its own
Make sure your ROS pc has ROS_IP
set to its own IP, and that ROS_MASTER_URI=http://$ROS_IP:11311/
. In most cases, a home LAN doesn't have proper DNS for the pc and/or the Android device, resulting in strange behaviour. Setting ROS_IP
should work around that.
On the Android device, make sure to use the ROS_MASTER_URI
with the IP address of the master (pc), not its hostname.
Once the Android node should be connected, use roswtf
, rosnode
and rostopic
to diagnose your graph.