If you do:
sudo apt-get update
sudo apt-get install libflite1
dpkg -s libflite1
What version of libflite1 is installed?
If you do:
sudo apt-get update
sudo apt-get install libflite1
dpkg -s libflite1
What version of libflite1 is installed?
@PeeBee Ubuntu 16.04 LTS (Xenial Xerus) is the current release. We are trying to get away from 14.04 since the required Qt version is not easily available.
@carpy
I had not yet run dist-upgrade, but after doing so I seem to receive the same errors.
@fnoop
The libflite1 that is installed is version 1.4-release-8ubuntu0.1. According to this: http://packages.ubuntu.com/trusty/libs/ that version is the most recent available on Trusty
Ok, 16 LTS has just been released. But 14.04 is supported until 2019, so its not cool to force an early upgrade on anyone who wants to use ApmPlanner
@Hidden_Markov
Hi, the package must have been built incorrectly somehow, these are the dependencies specified in the package metadata:
Depends: libasound2 (>= 1.0.16), libc6 (>= 2.14), **libflite1 (>= 1.4-release-9~)**, libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0), libqt5gui5 (>= 5
.3.0) | libqt5gui5-gles (>= 5.3.0), libqt5network5 (>= 5.0.2), libqt5opengl5 (>= 5.0.2) | libqt5opengl5-gles (>= 5.0.2), libqt5printsupport5 (>=
5.0.2), libqt5qml5 (>= 5.0.2), libqt5quick5 (>= 5.0.2) | libqt5quick5-gles (>= 5.0.2), libqt5script5 (>= 5.0.2), libqt5serialport5 (>= 5.1.0),
libqt5sql5 (>= 5.0.2), libqt5svg5, libqt5test5 (>= 5.0.2), libqt5widgets5 (>= 5.2.0), libsdl2-2.0-0 (>= 2.0.0), libsndfile1 (>= 1.0.20), libssl1
.0.0 (>= 1.0.0), libstdc++6 (>= 5.2), zlib1g (>= 1:1.1.4), qtdeclarative5-qtquick2-plugin | qml-module-qtquick2
These aren’t in the project control file:
https://github.com/ArduPilot/apm_planner/blob/master/debian/control
So they must be added at packaging time on a machine with higher libflite version than standard, at a guess.
Ok, I finally had a chance to look at this problem closely.
Use this guy instead. He was built using Qt 5.4.2 static libs. (The VM that the apm_planner_2.0.20_ubuntu_trusty64.deb package was built on is gone, so it’s hard for me to troubleshoot.)
sudo apt-add-repository ppa:beineri/opt-qt542-trusty
sudo apt-get update
sudo apt-get install qt-latest
source /opt/qt54/bin/qt54-env.sh
sudo dpkg -i apm_planner_2.0.23-rc1_ubuntu_trusty64.deb
apmplanner2
Thank you for the new build. Sorry for the late reply, I was away. I was able to install apmplanner2 using the instructions you posted, but unfortunately when I start apmplanner I receive this error message:
"Unable to load ApmToolbar.qml. Please reinstall the application and try again. Errors are as follows:
file:///usr/share/APMPlanner2/qml/ApmToolBar.qml:17:1: module "QtQuick" is not installed"
Line 17 is just “import QtQuick 2.0”
After the error message the rest of APM planner seems to launch okay, but I am missing the toolbars and the primary flight display.
A similar problem I found suggests installing qtdeclarative5-qtquick2-plugin, but I already have that installed and at the newest version (I believe install qt-latest installed this plugin).
@Hidden_Markov I got this same error when testing. Make sure you are setting the environment correctly so it points to Qt 5.4.2.
source /opt/qt54/bin/qt54-env.sh
@carpy
Hmm I’ve made sure that I have been using that source command (I’ve tried with and without --extend). Unfortunately I still receive the same error
I’ve checked the paths that the .sh file add and it seems fine there.
echo $PATH
/opt/qt54/bin:/opt/ros/indigo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
echo $LD_LIBRARY_PATH
/opt/qt54/lib/x86_64-linux-gnu:/opt/qt54/lib:/opt/ros/indigo/lib
echo $PKG_CONFIG_PATH
/opt/qt54/lib/pkgconfig:/opt/ros/indigo/lib/pkgconfig
Edit1: I still cant get the .deb install to work properly, however I am now able to manually build and run apm_planner by using “source /opt/qt54/bin/qt54-env.sh” before the qmake command in the build tutorial. When I run my own build, I no longer have the missing QtQuick module error.
Edit2: My problems are now basically solved, since I can now run my own build without issues. I’ve been able to connect my erle-brain2 and pfxmini quads to APM and everything seemingly works (still haven’t flown yet).
Thank you very much @carpy for your help!
Glad you got it going. Still a mystery regarding the PATH problem…I’ll so some digging when I can.
The easiest way to put APM Planner on Linux Ubuntu machine is to download the installer from here http://download.qt.io/official_releases/qt/ Qt5.4 or greater and then grab the code and build it in QtCreator or the command line.
It will work with 14.04LTS
The issue is building pre-built packages for 14.04 etc… This requires more effort and work and needs a ppa, or embedded qt binaries in the installer. If somebody wants to step up and build the needed ppa that would be great. In the meantime it’s the limited set of prebuilt packages.
We are maintaining compatibly at the code level with older distros, so you won’t need an OS version update.
Hope that helps
Thanks billb. Hopefully that ‘somebody’ will pick this up and create the embedded binaries or ppa!
OMG, this is driving me crazy
Trying to use @carpy’s DB solution, I get the same error as @Hidden_Markov about the toolbars.
And trying to follow the build tutorial using source /opt/qt54/bin/qt54-env.sh
, as he suggested, ends in the following compilation error:
`In file included from /opt/qt54/include/QtGui/qopenglcontext.h:54:0,
from /opt/qt54/include/QtGui/QtGui:32,
from libs/opmapcontrol/src/mapwidget/mapgraphicitem.h:35,
from libs/opmapcontrol/src/mapwidget/gpsitem.h:34,
from libs/opmapcontrol/src/mapwidget/gpsitem.cpp:28:
/opt/qt54/include/QtGui/qopengl.h:122:21: fatal error: GL/gl.h: No existe el archivo o el directorio
^
compilation terminated.`
So I’m a bit lost now (I’m a newbie at both Linux and Ardupilot).
How did you finally solved this issue with the toolbar? I have had the same problem.
any help will be greatly appreciated thanks
How did you finally solved this issue with the APM toolbar? I have had the same problem.any help will be greatly appreciated thanks
Create a symbolic link with this command:
sudo ln -s /opt/qt54 /usr/local/Qt-5.4.2
Right thanks much, I solved it.
Now after lunching it I get this:
The current user does not have the correct permissions to access serial devices. Use “sudo adduser dialout” and then log out and in again
How I could fix this? Not sure if I would need to have an autopilot plugged to figure it out?
thanks much
Type at the command prompt:
whoami
For example:
dave@dave-AO722:~$ whoami
dave
Then for example, type:
sudo adduser dave dialout
Substitute your username instead of dave.
Here’s full instructions on how to build the ‘The Easy Way ™’ see here for why
Download http://download.qt.io/official_releases/qt/5.9/5.9.3/qt-opensource-linux-x64-5.9.3.run from the Qt website and follow the instructions below in terminal
cd ~/Downloads/
chmod +x qt-opensource-linux-x64-5.9.3.run
./qt-opensource-linux-x64-5.9.3.run
# Make sure you select the Desktop gcc 64bit option to install in the wizard
# Change your setup to use installed version of qmake
sudo rm /usr/bin/qmake
sudo ln -s $HOME/Qt5.9.3/5.9.3/gcc_64/bin/qmake /usr/bin/qmake
# Build APM Planner 2.0
mkdir ~/workspace
cd ~/workspace/
git clone https://github.com/diydrones/apm_planner
qmake apm_planner.pro
make -j4 # use -j8 on i7
# Run APM Planner 2.0
./release/apmplanner2