APM Planner 2.0 on RPI3 running raspbian

Hello,
So i just got a Raspberry Pi 3 to use in my groundsation and i want to run APM Planner 2.0 on it.
But i cannot install any version on raspbian so i need some help.
I have run it on Ubuntu mate but the performance of ubuntu o the rpi is very bad.

There is a difference between Debian and Ubuntu, mainly around OpenGL vs OpenGLES.

I see Raspbian is shipping an experimental OpenGL driver for the desktop, maybe check that out:
raspberrypi.org/blog/anothe … n-release/

After messing with a lot of things i finnaly got the APM Planner 2.0 working in the raspberry pi 3. Not the fastest thing but it works

Hi dvdt2,
I just tried to run APM Planner 2 (Version 2.0.18) on the PI3. At first I compiled Qt 5.6 on it and than APM planner. But I got a problem with the QML elements running within the QtWidgets. It seems like the function QWidget *QWidget::createWindowContainer(…) can not get OpenGlES contexts under Rapsbian. Error Message: EGLFS OpenGL windows cannot be mixed with others.

However I can run pure QML application using the eglfs backend, but than no Widgets elements are available.

Using the XCB Backend:
QXcb Integration: Cannot create platform OpenGL context, netiher GLX nor EGL are enabled.

Could you be so kind and provide some Details? Which APM Planner Version are you using? Did you enable the new open gl es driver with raspi-config?

I would appreciate some tips. If every thinks work we could post some instructions here.

Best Regards
Olav

You can use Qt5.6* with APM Planner 2.0. There used to be a direct OpenGl dependency, but that has been removed. The dependency is only indirectly through QtQuick (QML) needs OpenGL/OpenGLES.

You might need to make sure you compile Qt5.6 for RPi with OpenGLES support.

*I would suggest Qt5.5.1 as better option.

Hi Bill, thanks for the reply … I will find some time this weekend to give it another try. Maybe I still have some dependencies missing a forgot a configure option.

Best Regards
Olav

I gave it one more try but having some issues with the open GL driver. So I switched to Ubuntu MATE 16.04. where APM Planner seems to work great! So my suggestion to other is to user UBUNT Mate for now.

1 Like

Hi Olav, When i try to run apm planner on ubuntu mate, the start up screen appears for 2 seconds and closes, When I run it from the terminal I get an error `FATAL: Could not initalize OpenGL. Any suggestions? Thanks

VHere is what I did to get APM Planner 2.0.24 running on Raspbian. My configuration is a Pi-Top 2 laptop with Pi 3B, have not tried on anything else.

Raspbian Stretch Desktop from www.raspberrypi.org

sudo raspi-config

  • configure all the usual stuff, locale, keyboard, network, timezone, etc
  • in advanced options enable the OpenGL driver - G1 GL (Full KMS)

sudo apt update
sudo apt upgrade

sudo apt install
qt5-default
qml-module-qtquick2
libqt5script5
libqt5serialport5
libsdl2-2.0.0

Download libssl1.0.0 from
https://packages.debian.org/wheezy/armhf/libssl1.0.0/download
chdir to the directory you downloaded to usually ~/Downloads
sudo dpkg -i libssl1.0.0-1.0.1t-deb7u3_armhf.deb

Download the precompiled APM Planner package from
http://firmware.ardupilot.org/Tools/APMPlanner/
apm_planner_2.0.24_xenial_armhf.deb
chdir to the directory you downloaded to usually ~/Downloads
sudo dpkg -i apm_planner_2.0.24_xenial_armhf.deb

There you have it, APM Planner 2 on Raspbian without having to recompile and no need for swap.

BTW for some reason it ends up in the “Education” menu

1 Like

As a follow-up I’ve been able to download firmware and update the parameters. However there seems to be a problem with compass calibration not saving the parameters to the board. I had to save the parameter file and manually update the compass offsets and then update the parameters from the saved file in order for the compass settings to stick and not cause compass calibration to fail in the pre-arm checks.

This is with a Cheerson CX-20 Open Source edition.