I just managed to get APM Planner RC2 running on my Raspberry Pi. I have not tested connecting to an APM yet but clicking around in the interface is much more responsive than i ever thought it would be.
Here are a brief instruction:
- Raspberry Pi with 32 GB SD card loaded with Raspian
- Added a 4 GB swap per the instructions here: http://jermsmit.com/my-raspberry-pi-needs-a-swap/ (the compilation will run out of memory otherwise)
Install the required packages:
sudo apt-get install phonon libqt4-dev \ libphonon-dev libphonon4 phonon-backend-gstreamer \ qtcreator libsdl1.2-dev libflite1 flite1-dev build-essential \ libopenscenegraph-dev libssl-dev
Clone the repository in your workspace:
cd ~/workspace git clone https://github.com/diydrones/apm_planner
Build APM Planner:
cd ~/workspace/apm_planner qmake-qt4 qgroundcontrol.pro
make
Run APM Planner:
./release/apmplanner2
Comments
Thank you so much! I did it! Ubuntu Linux version 15.10 I didn't do permanent installation though, as instructed here: https://github.com/RestlessC0bra/apm_planner I don't know what these values for x and y are supposed to be. If anyone could kindly explain it'd be nice. I managed to do "permanent installation" 5b) though, but an APM Planner icon didn't show up on the sidebar, so i'm guessing that's not so permanent.
For Pi you need to have Qt5 installed from binaries or built from source.
master_qt4 is a snapshot in time as we converted to Qt5. It's outdated but will work with Qt4 (but no need, get Qt5)
I just tried all this on my dedicated linux box from the terminal and apm planner will not even build in linux.
I keep getting compilation errors of no such file or directory for QtWidgets
I am going through and installing it on my raspberry pi right now. I will be putting everything in an aluminum tool box to make it all portable.
@ William Randol
Thanks! Seems like 2.0.0-RC2 will build natively on either pi with almost exactly the instructions here. Do you mean the latest version of APM Planner which is current on github now? Have you managed to build that like you describe in your post above?
Seems like that one requires QT5 to get anywhere. Problem is, there are no packages (or weren't last week) for QT5 for the RPi. I had commenced on a little mission to try to build Qt natively on the Pi, but certain of the modules seem hard to find, like QtWebWidgets and QtQuick so that project should get easier as time passes.
Anyway, the base Qt5 built, on the Pi ok, but that's not enough to build APMPlanner (latest).
@Bill Bonney Well, the cross build seems to have completed without incident, finally, if I'm not sorely mistaken.
I moved the binary over to the pi, and it seems to run the same as the version built natively there.
That's on a Kubuntu instance under VMWare.
Briefly, one wants to have a pi connected, and sshfs the necessary libraries and includes.
Make sure it builds successfully on the desktop, for the desktop first.
Then setup a kit, qt version, and compiler in QtCreator.
Add a qmake.conf under /usr/share/qt4/mkspecs/arm-linux-g++ which points to all the correct mapped places.
Do a bit of mucking around to some of the .pri and .pro files, and it builds.
I'll do a diff between this version and a .git clone of the original.
Aside from that, what sort of documentation would you like?
@Bill Bonney
"If you setup a cross-compile for RPi and document it I can setup an automated build..."
Well, here it is running from a native compile on the Rpi2 model B, which is faster than the original in case people are interested in the speed difference:
https://www.youtube.com/watch?v=raQAC0725Jo
And...I made some progress towards a cross-compile starting from the halherta examples you provided above. Thanks again for those.
Some further wrangling is necessary to ensure that only the sshfs mounted raspberry pi includes and libs (and the ones in the source directory) get used, (I used some hacky symlinks) but currently the build is simmering away in QtCreator 3.3.0 on my VMWare box. The bad news (or good news?) is that it's not significantly faster compiling in VMWare Kubuntu on 1 core in a desktop than it is on the Pi 2!
An earlier, more hackish attempt revealed some serious problems during the link resolving all the Qt:: references, so when this stab at the goal winds down, I'll probably have to do some more messing around to correct the link stage, but I'm taking notes for you!
@Bill Bonney
Thanks a bunch! Last night I built MP 2.0.0-RC2 on the Raspberry Pi 2. In this case it only took about 1.5 hours. This machine doesn't seem to respond too well to the "2.0" overclocking profile in raspi-config, so I rand it at "modest" instead for stability during the compile.
When I executed it, it brought up the gui/map in about 10 seconds, vs about 30 seconds on the Pi 1.
I added some waypoints, connected to my APM, downloaded the waypoints, and checked the attitude/compass feedback. It's basically usable, if a little laggy with the map. Perhaps some tweaks to caching the map stuff might help a bit.
Now if there was an android distro that would run on this Pi2, it might just work with droidplanner!
-
1
-
2
-
3
of 3 Next