Closed erobinson-1997 closed 1 year ago
As a clarification that could help later, that Inforce Android OS image you reference, you download it from the Inforce website, right?
Yes, I got it from the website. They don't host the file; I had to contact them directly for the iso mentioned in the readme. The OS seems to be working fine. Today I made an Android Studio app for the HLP board that uses rosjava to communicate with a separate ROS package I made.
Something that I noticed while continuing to develop for my project was that the hostnames on the HLP development board don't resolve to IP addresses in the Android rosjava apps. I can ping the hostnames from the adb shell, but the hostnames are just regular strings within the context of my MainActivity.
I will be trying hard-codded IPs in the guest science manager later this evening. I'll be sure to leave my notes and solutions here.
Yep, I hard-codded the IP addresses and was able to connect to the guest science manager. Not sure if I should close this issue. There might be a way to get the hostnames to work.
Any chance you have this APK source code on a repo accessible to us, so we could try to replicate the issue?
I took another look into the issue and I was able to get the guest science manager working with the hostnames in /etc/hosts
.
I think the Guest Science Manager successfully connects with the LLP only once on startup, which means the LLP software always needs to be launched first. I did a test where I launched the Guest Science Manager first, and a Publisher registration fails until the Master_URI starts running. We can see it open up on 10.42.0.31 in the output below, and a publisher is successfully registered; however, the GDS local simulator will not connect.
1970-03-10 07:22:58.828 28303-28327/gov.nasa.arc.astrobee.android.gs.manager I/DefaultPublisher: Publisher registration failed: Publisher<PublisherDefinition<PublisherIdentifier<NodeIdentifier</guest_science_manager, http://hlp:46897/>, TopicIdentifier</rosout>>, Topic<TopicIdentifier</rosout>, TopicDescription<rosgraph_msgs/Log, acffd30cd6b6de30f120938c17c593fb>>>>
1970-03-10 07:23:03.889 28303-28329/gov.nasa.arc.astrobee.android.gs.manager I/Registrar: Response<Success, Registered [/guest_science_manager] as publisher of [/rosout], [http://10.42.0.31:33921/]>
1970-03-10 07:23:03.891 28303-28327/gov.nasa.arc.astrobee.android.gs.manager I/DefaultPublisher: Publisher registered: Publisher<PublisherDefinition<PublisherIdentifier<NodeIdentifier</guest_science_manager, http://hlp:46897/>, TopicIdentifier</rosout>>, Topic<TopicIdentifier</rosout>, TopicDescription<rosgraph_msgs/Log, acffd30cd6b6de30f120938c17c593fb>>>>
I would like to add that the only changes I made to the code are shown in the screenshot below. I have a public forked repository here, but it doesn't include the hard-code IP addresses.
I want to make sure I understand: you are saying you were able to finally have the GS manager connect (using hostnames) to the LLP (based on the logcat output) but the gds_simulator.py still can't find it, correct?
Could you please check the output of /gs/gs_manager/config
and /gs/gs_manager/state
? If you see output there about your GS APK, then the problem is the gds_simulator.py
or its environment. If you do not see output on those topics then it means the GS manager is still not really connecting. I am also assuming you have your GS APK installed to your HLP board.
Please make sure to always start the Astrobee ROS simulator first, then run gs_manager.sh restart
. Run this command every time you restart the ROS sim, and/or when the network resets. Also, make sure the HLP screen is always on and awake. Android sometimes blocks network communications if that is not the case.
Let me know how it goes.
I did a test where I was able to connect to the guest science manager with the gds_simulator.py
script. I then was presented with a list of guest science applications, and I launched a guest science app.
Everything seems to be working fine with no issue. I think I was just launching things out of order until I coincidentally launched things correctly when I changed the hostnames to hard-coded IPs. The Logcat output was also displaying the hostnames instead of showing the actual IP addresses, so I thought they were being interpreted as string literals. When I connect successfully while using hostnames I get a mix of raw IPs and hostnames in my Logcat output as shown below:
I am going to re-clone, re-build, and re-install just to make sure. I'll close this issue if everything works fine.
I am using an Inforce 6640 HLP Development board and a Dell PC tower to develop a Guest Science application. The development board is running the correct
Inforce-IFC6601-AndroidBSP-880457-Rel-v2.1.zip
image, boots, and has been tested with a mouse and monitor. I am using Ubuntu 16.04 on the desktop PC with a cat5 cable going to the development board. The development board has been configured to useadb
via IP rather than USB, and the Guest Science Manager has been installed. The Guest Science Manager runs via thegs_manager.sh
script (confirmed withadb shell ps | grep gov
), and with Android Studio v3.6.3 I am also able to attach a debugger to theguest_science_manager
app (output shown later).On both devices the
/etc/hosts
file has been updated to provide definitions forhlp
andllp
. The Dell Ubuntu computer has a "Manual" connection made with the GUI as shown below:Android
/etc/hosts
:Dell PC
/etc/hosts
:I pushed the
text_file.sh
described in the HLP installation instructions to/persist/eth0.sh
as shown below:In two terminals I have executed the following commands with resulting output to define
ROS_MASTER_URI
. Both terminals are able to ping eachother:From the Android adb shell to the development board, I am also able to ping the Dell PC as shown below:
This is the command and output when I run the Astrobee simulator:
When running
python3 ~/astrobee/src/tools/gds_helper/src/gds_simulator.py
I get the following output:Here is the output from Logcat in Android Studio while the
gds_simulator.py
script is trying to connect to the Guest Science Manager app: