Distributor

APM Planner 2.0 RC2 on Raspberry Pi

3689570947?profile=original

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:


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

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • @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!

  • Developer

    @Joe: If you setup a cross-compile for RPi and document it I can setup an automated build and make it part of the AP2 releases. That would save me some time investigating (maybe, if interest I could even look at a BBB version ;) )

  • @Bill Bonney

    Oh, thanks, Bill. The thought just occurred to me last night, after a day of build wrangling on the pi!

    Willing to bet it builds in ~1/2 hour on a properly configured PC running the cross toolchain.

    I only really bumped up my swapfile size for the final link stage, so it might've been quicker if I'd bumped it earlier. :-D

    I'm wondering how to ensure that the build env on the PC and the pi are absolutely synched. My Pi 2 (x2) arrives Friday, so unless it's markedly faster building there, I might try this!

    I do think with just a touch more speed, and a way of displaying the MP screens properly (possibly some sort of X windows Oculus overlay mechanism and suitable pointing device) that it'd be possible to have a portable, low power, wearable GC setup. Combine that with easily selectable FPV mode thru the Oculus, or perhaps a pi/fpv transparency function, and we'd really have something useful for the flying field!

  • Developer

    @Joe et al. Great work on the RPi build. Has anyone attempted cross-compiling on the desktop first then downloading. e.g http://hertaville.com/2012/09/28/development-environment-raspberry-...

  • Success!

    Got it to build on a Pi 1! It does require some mucking around to increase swapfile size, to get the build to complete, and also to get it to boot up quickly, and also a fast, big, SD card is helpful. I actually got it to connect to the UAV, and put in some waypoints on the map. Not nearly as crisp as on the PC, but it's barely usable. I'm hoping it's quite ok on the Pi 2.

  • Oh, woops, I should have noticed. Droidplanner for Android. Different thing.

    Although, I still think it's worth a try to compile it for the RPi2.

  • Thanks RC Tech!

    From the TV stick specs, looks like if it works passably there it might just work passably on a Raspberry Pi 2 (Quad core Arm A7).

    Any luck getting it to build on the TV-stick?

  • Distributor

    It was not a viable solution to run this on a Pi. It was painfully slow. I am fiddling with Android TV sticks now, trying to get Droidplanner for Android to work. http://www.ebay.com/bhp/android-tv-stick

This reply was deleted.