intel-aero / meta-intel-aero

Yocto layer to support Intel Aero platform
https://github.com/intel-aero/meta-intel-aero
GNU General Public License v2.0
218 stars 119 forks source link

Cannot connect to flight controller and FPGA after Ubuntu installation #291

Closed lukasvst closed 6 years ago

lukasvst commented 6 years ago

We have installed Ubuntu on the Intel Aero RTF drone following the instruction at https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation

Although the flight controller and the FPGA have been working with Yocto before, after installing ubuntu calling sudo aero-get-version.py yields: BIOS_VERSION = Aero-01.00.13 OS_VERSION = Ubuntu 16.04.03 LTS" AIRMAP_VERSION = UNKNOWN FPGA_VERSION = unknown AeroFC firmware version = unknown

Also calling sudo systemctl restart mavlink-router gives an error message ... (code=exited, status=1/FAILURE)

We have tried to update the flight controller using sudo aerofc-update.sh nuttx-aerofc-v1-default.px4 however this hangs with the message If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.

Can you help us with this issue?

zehortigoza commented 6 years ago

Could you check if it booted with the right kernel version? It should be Linux 4.4.X

anselmolsm commented 6 years ago

AeroFC firmware version = unknown

It's a known issue, as mentioned at https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation#get-version . It's a script issue, not a communication problem.

lukasvst commented 6 years ago

Thanks a lot for the answers! We were able to flash the flightcontroller now. The reason for the problem was that we had booted the wrong kernel version.

gitsr-sys commented 6 years ago

Yes, it is related with Linux kernel.

By following https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation#get-version, when you power on the intel aero rtf, you can see GRUB screen. I always choose the first one.....then the kernel version is the following..

$ uname -a
Linux intel-aero-rtf-ubuntu 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

But, we need the version of Linux 4.4.x to install FPGA and FC!!

So how to choose Linux 4.4.x version of kernel?

Turn on the intel aero rtf... and in GRUB, you can see the default boot mode is the second one... press enter key... then you can see Linux 4.4.x... That is, it is already set to select Linux 4.4.x kernel............. I did not know why GRUB default set as like that...

Anyhow.. it is solved... So keep setting up your intel drone by following https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation#get-version

Thank you.

gitsr-sys commented 6 years ago

But I got the problem after that, @lukasvst @zehortigoza @anselmolsm . I got the result from sudo aero-get-version.py as

BIOS_VERSION = Aero-01.00.13
OS_VERSION = Ubuntu 16.04.03 LTS"
AIRMAP_VERSION = UNKNOWN
FPGA_VERSION = 0xc2
AeroFC firmware version = unknown

I flashed fc with $ sudo aerofc-update.sh nuttx-aerofc-v1-default.px4 and flashed completely. However, it is still AeroFC firmware version = unknown

Please help me...

anselmolsm commented 6 years ago

aero-get-version.py calls a script called aerofc-get-version.py which needs pymavlink. Pymavlink is not packaged for Ubuntu 16.04 (that's why it is not listed as a dependency). Install pymavlink (e.g. using pip).

gitsr-sys commented 6 years ago

Hi @anselmolsm , thanks for your reply.

actually I did $ sudo pip install pymavlink by following https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation#intel-aero-repository

But there was some errors. So I upgrade pip and tried $ sudo -H pip install pymavlink

was that something wrong? Do you have any idea?

anselmolsm commented 6 years ago

The aforementioned script is written in python 3. pip is for python 2. ~Try with pip3.~

~EDIT: The doc you linked needs a patch ;)~ EDIT2: Nope, it's correct. It's pip and not pip3

gitsr-sys commented 6 years ago

I also installed python3-pip and pymavlink using $ sudo apt-get install python3-pip $ sudo -H pip3 install pymavlink

However, I still get the result from sudo aero-get-version.py as BIOS_VERSION = Aero-01.00.13 OS_VERSION = Ubuntu 16.04.03 LTS" AIRMAP_VERSION = UNKNOWN FPGA_VERSION = 0xc2 AeroFC firmware version = unknown

Do you mean that I need to install pip3 instead of pip2 after installing ubuntu? (Do you mean do not install pip2? but install pip3?)

That is, the link needs to be changed from "sudo apt-get -y python-pip" to "sudo apt-get -y python3-pip"? Then, run sudo -H pip install pymavlink?

Is that what you mean, @anselmolsm ?

anselmolsm commented 6 years ago

See if aerofc-get-version.py outputs any helpful message and paste it here, please.

gitsr-sys commented 6 years ago

Thank you for your reply. I looked over aero-get-version.py, and I understood.

I am following https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation#get-version,

echo 'deb https://download.01.org/aero/deb xenial main' | sudo tee /etc/apt/sources.list.d/intel-aero.list
wget -qO - https://download.01.org/aero/deb/intel-aero-deb.key | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install gstreamer-1.0 libgstreamer-plugins-base1.0-dev libgstrtspserver-1.0-dev gstreamer1.0-vaapi gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav ffmpeg v4l-utils python-pip
sudo pip install pymavlink
sudo apt-get -y install aero-system
sudo reboot

this is what I did. But after running the above commands, I cannot find any aerofc-get-version.py file in this computer of intel drone....so "sudo aerofc-get-version.py" outputs "aerofc-get-version.py: command not found"

Do I need to install additional program?

anselmolsm commented 6 years ago

It was to execute the command and get the output, no need to read the script.

Let's move this to https://github.com/intel-aero/packages/issues/37. Thanks.

gitsr-sys commented 6 years ago

Now all issue which described inthis post is solved.

Follow the instruction in https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation to install ubuntu on Intel drone.

It works correctly now. Thanks for fixing it, @anselmolsm !