Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Unable to run on Android emulator #296

Open
breandan opened this issue Apr 1, 2019 · 6 comments
Open

Unable to run on Android emulator #296

breandan opened this issue Apr 1, 2019 · 6 comments

Comments

@breandan
Copy link

breandan commented Apr 1, 2019

Hi @jubeira! I am able to run the examples from rosjava/android_apps on physical android devices, but unable to run rosjava on an emulator/AVD. I have been trying to configure emulator networking by using telnet commands redir add tcp:11311:11311 as described in the Android developer docs. I also saw several older threads from 2011-2012 and was curious to know if usability has improved in this area? In particular, I am concerned by @damonkohler's comment about rosjava being unable to configure port ranges. Is this still an issue on more recent versions?

It appears that the virtual client contact a remote master node, but not vice versa. I have tried running the master on both the android virtual device and my local Ubuntu machine. However, I was hoping to set up a local AVD for development and integration testing. I was also wondering what is the status of rosjava on ros2? I saw @esteve's presentation on ros2_java at ROSCon last year, and was wondering what is the official status of ROS2 on rosjava? Is this project still active? Thank you for your help.

@jubeira
Copy link

jubeira commented Apr 15, 2019

Hi @breandan, sorry for the delay!

I have vague memories of using ROS Android apps in the emulator; I think it was possible to do so. One of the threads you posted claims that it's possible to make it work. I'd say that its more a networking problem than a rosjava problem itself; it's like running inside docker at some point. If you could find a way to bridge the networks, then that's probably the easiest way to make it work.

I was also wondering what is the status of rosjava on ros2? I saw @esteve's presentation on ros2_java at ROSCon last year, and was wondering what is the official status of ROS2 on rosjava? Is this project still active? Thank you for your help.

Maybe @esteve can answer that ;). I played a bit with it about an year ago when ros2 was at beta3 release and it worked back then, but I didn't do much follow-up on it since then.

@gxshao
Copy link

gxshao commented Jul 3, 2019

The JoyStickView doesn't work on Android emulator...but other publisher and subscriber seems good.
emulator abi:x86 api:android-28

@ielson
Copy link

ielson commented Feb 1, 2020

Hey @breandan have you ever find a way to make it work?
I'm facing the same issue here

@breandan
Copy link
Author

breandan commented Feb 1, 2020

Never solved this issue but maybe @gxshao can provide further details? Earlier last year I spent several hours debugging with Wireshark, trying different TCP settings, but pub sub did not work properly. Maybe the emulator or ROS2 networking config has changed since then.

@ielson
Copy link

ielson commented Feb 1, 2020

I'm tried many things since last week and nothing worked. I think the problem is caused because when the emulator connects to master it says it's ip is 10.0.2.16, but the computer can't see this ip, so it can't answer to the emulator, and even if we use redir, we know that 11311 port is used by ROS master, but each time a node is started, it is in a different port, so we cannot redir it.
What made me confuse was @gdvhoorn in this question: https://answers.ros.org/question/223602/android_core-emulator-registers-topic-but-not-sending-events/ that says it can be correct with configuration of ROS_IP, ROS_MASTER_URI and ROS_HOSTNAME

@gxshao
Copy link

gxshao commented Mar 2, 2020

I'm tried many things since last week and nothing worked. I think the problem is caused because when the emulator connects to master it says it's ip is 10.0.2.16, but the computer can't see this ip, so it can't answer to the emulator, and even if we use redir, we know that 11311 port is used by ROS master, but each time a node is started, it is in a different port, so we cannot redir it.
What made me confuse was @gdvhoorn in this question: https://answers.ros.org/question/223602/android_core-emulator-registers-topic-but-not-sending-events/ that says it can be correct with configuration of ROS_IP, ROS_MASTER_URI and ROS_HOSTNAME

that's right... the network problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants