Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I suspect your phone is having some trouble resolving publisher hostnames; I suggest you set your ROS_MASTER_URI and ROS_HOSTNAME on the PC using IP addresses like so:

export ROS_MASTER_URI="http://192.168.178.21:11311"
export ROS_HOSTNAME="192.168.178.21"

The reason behind this is that, when your publisher registers a topic, it uses ROS_HOSTNAME as the host name for that topic. When a remote node contacts the master to get the address of a remote service, it gets back the value of ROS_HOSTNAME (among other things), and if it can't resolve that address, it can't subscribe to the associated topic or make the associated service call.

You can see which address is actually associated with a topic using 'rostopic info <topic>'

I suspect your phone is having some trouble resolving publisher hostnames; I suggest you set your ROS_MASTER_URI and ROS_HOSTNAME on the PC using IP addresses like so:

export ROS_MASTER_URI="http://192.168.178.21:11311"
export ROS_HOSTNAME="192.168.178.21"

The reason behind this is that, when your publisher registers a topic, it uses ROS_HOSTNAME as the host name for that topic. When a remote node contacts the master to get the address of a remote service, it gets back the value of ROS_HOSTNAME (among other things), and if it can't resolve that address, it can't subscribe to the associated topic or make the associated service call.

You may also have to explicitly set or choose an IP address as the address that is advertised on the android side; I think there's an API for this, but I'm not sure what it is.

You can see which address is actually associated with a topic using 'rostopic info <topic>'

You can get the address associated with a ROS node using 'rosnode info <node_name>'