Code Monkey home page Code Monkey logo

samples's Introduction

Samples

This repo contains sample files to show you how to use the SDK.

Mobile samples

The mobile samples use the following architecture:
alt mobile_uml

They are standalone, this means that you can clone this repo and use them without compiling the SDK. To enable this, they will use the precompiled SDK libraries.

The mobile samples show you how to connect, pilot, take pictures, display video stream if available, and download medias from the drone.

They support the following drones:

  • Bebop 2
  • Bebop
  • JumpingSumo
  • Jumping Race
  • Jumping Night
  • MiniDrone Rolling Spider
  • Airborne Cargo
  • Airborne Night
  • Swing
  • Mambo

And the following remote controller:

  • SkyController
  • SkyController 2

What if you want to only build an app for the Bebop? Simply delete other files than

  • DeviceListActivity
  • DroneDiscoverer
  • BebopActivity
  • BebopVideoView
  • BebopDrone
  • SDCardModule

As said before, each mobile sample can be used without having to build the SDK: it will use the precompiled libraries. But you can also use the sample with your own compiled SDK.

iOS

Use the precompiled SDK (hosted on Github):
Use the buildWithPrecompiledSDK configuration to use the precompiled libraries (Product->Scheme->Edit Scheme).
Please note that the first time you'll build with the precompiled SDK, it will download the precompiled libraries from Github, this might take a while.
By using the precompiled libraries, you don't need to download the sdk source files neither to compile the sdk.

Use your own compiled SDK:
You can build this sample with Alchemy. In your <SDK> execute this command:

./build.sh -p arsdk-ios -t build-sample -j for iOS ./build.sh -p arsdk-ios_sim -t build-sample -j for iOS simulator

Otherwise, if you want to use Xcode to build, first execute this command in <SDK>:
./build.sh -p arsdk-ios -t build-sdk

Then, in XCode, use the buildWithLocalSDK configuration to use your freshly compiled sdk libraries. (Product->Scheme->Edit Scheme).

Please note that there are two targets in the iOS sample: SDKSample and SDKSampleForSkyController2.
The first one is using -lardiscoverywithouteacc in its Other Linker Flags list and does not include the ExternalAccessory framework. However SDKSampleForSkyController2 uses -lardiscovery and includes ExternalAccessory framework.

Android

Use the precompiled SDK (hosted on JCenter):
With Android Studio, open the settings.gradle located in SDKSample/buildWithPrecompiledSDK.
By using the precompiled SDK, you don't need to download the sdk source files neither to compile the sdk.

Use your own compiled SDK:
You can build this sample with Alchemy. In your <SDK> execute this command:

./build.sh -p arsdk-android -t build-sample

Otherwise, if you want to use Android Studio build, first execute this command in <SDK>: ./build.sh -p arsdk-android -t build-sample-jni

Then, in Android Studio, open the settings.gradle located in SDKSample/buildWithLocalSDK.

Native samples

This example enables you to connect to a Bebop drone and send and receive commands to pilot it and get its battery level. It also receives the video stream.

To use it, you'll need to download and compile your own sdk.
Once done, in the sdk root folder, you can build the sample:
./build.sh -p arsdk-native -t build-sample-BebopSample -j Then run it:
./out/arsdk-native/staging/native-wrapper.sh ./out/arsdk-native/staging/usr/bin/BebopSample

or if you are on a MacOs computer:
./out/arsdk-native/staging/native-darwin-wrapper.sh ./out/arsdk-native/staging/usr/bin/BebopSample

This example enables you to connect to a JumpingSumo and send and receive commands to pilot it and get its battery level. It also receives the video stream.

To use it, you'll need to download and compile your own sdk.
Once done, in the sdk root folder, you can build the sample:
./build.sh -p arsdk-native -t build-sample-JumpingSumoSample -j Then run it:
./out/arsdk-native/staging/native-wrapper.sh ./out/arsdk-native/staging/usr/bin/JumpingSumoSample

or if you are on a MacOs computer:
./out/arsdk-native/staging/native-darwin-wrapper.sh ./out/arsdk-native/staging/usr/bin/JumpingSumoSample

External contributions

Contributions from external developers are located in the Contributions folder, then sorted again by OS. The name of the contributors/authors for each samples are written in the Contributions/CONTRIBUTORS.txt file.

samples's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.