android_core - Emulator registers topic but not sending events
I've got android_core and rosjava_core as projects under Android Studio. I'm currently running a Ginerbread (API:10) emulator and debugging it.
The android_tutorial_pubsub registers it's self as a topic publisher and I can see that the topic has been registered with roscore.
'rostopic list' sees the topic but doesn't see any events with 'rostopic echo /mychatter
'$ rostopic list
/mychatter
/rosout
/rosout_agg
$ rostopic echo /mychatter
wireshark show the http message being sent to register the /mychatter topic but nothing thereafter. Browser on emulator shows the web page fine on the rosecore host. The debugger shows the app is waiting to accept something.
My guess is that the 'rostopic echo /mychatter' should be connecting to the android_tutorial_pubsub app on the emulator.
Thought while debugging id see if anyone had any suggestions. I'll double check the wireshark trace and compare it to android_tutorial_pubsub running in the rosjava_core running locally on my workstation.
I thought I'd try to increase the logging level on the ROS Java Related Nodes:
$ rosnode list
/android_gingerbread/ros_text_view
/rosjava_tutorial_pubsub/talker
/rosout
So here I tried to list the loggers on the ROS Nodes. The ROS-JAVA related nodes seem to be Broken:
$ rosconsole list /rosout
ros
ros.roscpp
ros.roscpp.roscpp_internal
ros.roscpp.superdebug
$ rosconsole list /rosjava_tutorial_pubsub/talker
rosconsole: error: node '/rosjava_tutorial_pubsub/talker' doesn't exist ...
or doesn't support query: ...
Service [/rosjava_tutorial_pubsub/talker/get_loggers] is not available.
$ rosconsole list /android_gingerbread/ros_text_view
rosconsole: error: node '/android_gingerbread/ros_text_view' doesn't exist or ...
doesn't support query: ...
Service [/android_gingerbread/ros_text_view/get_loggers] is not available.
-pete
Many issues like this with the Android emulator come down to incorrect networking configuration. Things to check: working DNS on both host and emulator (if you're using hostnames), correct setting of
ROS_IP
(if not using hostnames), firewall/NAT settings (prefer bridging), etc.Can you update your question and include the values of
ROS_MASTER_URI
,ROS_HOSTNAME
,ROS_IP
and the network configuration of both your host PC and the emulated Android device?