Tuesday, June 30, 2015

Setup Dev Environment for the Parrot Minidrone SDK

Why a Minidrone SDK?

A coworker recently received a Parrot Minidrone Jumping Sumo. This is a wheeled drone that can jump 2.5 ft into the air and jump gaps (forward jumps). It has an onboard camera that allows you to drive the drone with your iPhone and see through it's eyes.

The drone also has an SDK for iOS and Android. Seeing that he has no time to use it he thought my kids and I might like it. So, now we have a minidrone with an SDK that we can use to control it.

But before we start with some code we have to get the dev environment setup so we can start to use this.

Start With Optimism

To get started, download the ARSDKBuildUtils and use this to install and build the environment.

Parrot Developers Github Community

There is an install document located in their repo: Docs/install/INSTALL

Here are the tools I had to pre-install:
  • wget, automake, autoconf, libtool
I already had homebrew install so installing them was fairly easy.
I already had git installed as well and did not need to install it with homebrew.

Here is where I said, I have a copy of libtool, I will skip that.

I had an openssl issue as well, but I will cover that later.

You Skipped A Step

Even though I had libtool installed, it was the pre-installed version and it caused many build issue. Since I had an older libtool than the library was built with the build scripts that were automagically generated were incompatible and hence I ran into a lot of compile issues.

Lesson for Devs Installing: Do not skip a step.

Lesson for Devs Publishing Libraries: List the exact versions of the tools you used to build your libraries on your machine.

When All Else Fails, Start Start Again

After trying the built in clean and force clean options of the SDK3Build.py build script and then rebuilding, I was still running into issues. I could see that the clean was not working.

So, I did the logical thing. After having installed the latest libtool through homebrew, I started over.

First, I deleted all the repos that the SDK3Build.py had downloaded.
Next, I deleted the ARSDKBuildUtils repo (folder, repo meaning repository I had downloaded from GitHub).

Now, with a clean environment with the list of prerequisite tools installed I started over, fixed the openssl issue, and volia I have a working dev environment for the minidrone.

What Next?

The samples for the SDK come with a sample of the new API they have written for one of their flying drones. That drone is a BlueTooth LE based device but the Jumping Sumo I have is a WiFi based drone. So, first I have to convert the BLE sample into a WiFi sample that can communicate and control the Jumping Sumo before I can do something more interesting with it.

Before We Go, What About OpenSSL?

The wget command to get openssl fails in the current version of the SDK3Build.py due to a certificate failure during the curl call. To get around this, I downloaded the version of openssl that the script was trying to download. Unzipped it into the openssl folder it had created and then reran the SDK3Build.py.

This allowed the SDK3Build.py script o get past the failure with openssl downloading. I had to do this again, after I wiped out everything when I went back to a clean slate.

1 comment:

Jochen said...

A coworker recently received a Parrot Minidrone Jumping Sumo. This is a wheeled drone that can jump 2.5 ft into the air and jump gaps ... eminidrone.blogspot.com