Unable to publish to subscriber running on android
I am trying to debug a pub-sub node pair implemented on android (ROS-android). Following are the details:
ROS-Core is running locally on android. A publisher and a subscriber are also running on the android phone (no emulator).
On PC side the following settings are made ROS_IP=pc_ip, ROS_HOSTNAME=android_ip, ROS_MASTER_URI =android_ip
All nodes are visible when I run rostopic list
Able to echo the published topic. (std_msgs.String)
Not able to send data to the subscriber. Then I looked into the TCP packets (using wireshark) and it appears the following transactions are happening:
- get pid (method call) - result : success
- register service - result : success
- Some broken message passing <irrelevant as="" the="" appearance="" of="" this="" packet="" exchange="" is="" random=""> [FIN,ACK] [ACK]
- register publisher - result : success RETURNS the right address of the subscriber
The ROS-master running on android is sending the correct address yet the android application is crashing with following message:
04-17 00:49:10.604 2563-3001/com.example.vivek.sampleb I/HttpMethodDirector: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
04-17 00:49:10.605 2563-3001/com.example.vivek.sampleb I/HttpMethodDirector: Retrying request
04-17 00:49:10.608 2563-3001/com.example.vivek.sampleb I/HttpMethodDirector: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
04-17 00:49:10.609 2563-3001/com.example.vivek.sampleb I/HttpMethodDirector: Retrying request
04-17 00:49:10.613 2563-3001/com.example.vivek.sampleb I/HttpMethodDirector: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Retrying request
I hope someone here can help me with this issue.