Skip to content

edmundo096/LeapRiftDrone

 
 

Repository files navigation

LeapRiftDrone

Our project page: http://leapriftdrone.blogspot.mx/ You can find more info about the project there!

This is a fork from the https://github.com/scopus777/RiftDrone project with the following differences:

  • Added support for Leap Motion device.
  • Added the necesary dependency libraries and code changed for opening in Unity 5, which also means..
    • Added support for Unity 5's integrated Oculus VR support.

The following list are the current added functionalities/features:

  • Leap Motion support.
  • Unity 5 VR integrated support.
  • Keyboard and generic Controllers (Joysticks input based on Moga Pro Power HID layout) input support for AR.Parrot 2 drone controlling.
  • Unity 5 x64 Editor support with the FFmpeg x64 library addition, for video streaming from the AR.Parrot 2 drone on the x64 version.

Following is the original project decription (which is slightly outdated):

============

This unity project combines the Oculus Rift with the AR.Drone 2.0. A small cockpit with a big screen at the front was created. The screen displays the view of the drone. The user can use the oculus rift to orientate himself in the cockpit. If he looks down, there is a smaller screen where he can see the view of the bottom drone camera. The drone is controlled with a xbox 360 controller. Because of legal issues this project does not contain the functionalties for the oculus rift. But it can be simple integrated manually. Read the chapter Installation für further instructions. This project is made for Windows and only tested under Windows 7 64-Bit.

For a small impression you can watch these videos: https://www.youtube.com/watch?v=3WmQ1_8ytaM https://www.youtube.com/watch?v=b68LKfNzn9c

Requirements:

Used libraries:

  • Ruslan-B/AR.Drone C# Framework
    • A C# Framework to control the AR.Drone. Originally this framework was made for .NET 4.0. I had to make same changes to make it possible to run the framework with .NET 3.5, because Unity only supports .NET up to the version 3.5. All needed files are contained in the script folder. More details about the changes can be found in the chapter “Changes on the AR.Drone C# Framework”.
  • Task Parallel Library for .NET 3.5
    • The AR.Drone framework uses some threading class which are not available in .NET 3.5. That’s why I had to add this library.
  • Ruslan-B/FFmpeg.AutoGen
    • A C# Wrapper for FFmpeg. This is needed to decode the video packets of the AR.Drone. The DLLs of this problem causing a little bit of trouble. If you simple put them into the directory "Assets\Plugins\x86" they are not found in the game. So you need to put them into the unity editor directory if you want to test the game in the editor. After you building, you have to put the DLLs in the directory of the exe to work correctly. You can find the FFmpeg DLLs in "Assets\Plugins\x86\FFmpeg".
  • Oculus Rift Plugin for Unity
    • This Plugin is needed to integrate the oculus rift. If you follow the link you will find a setup guide for the plugin.
  • XInputDotNet
    • This library is used to manage a connected xbox controller.
  • Cockpit of the FA-38 3D-Model
    • Thanks to ysup12

Installation:

This project does not include every Library needed to execute the application. Therefore you have to follow the following instructions.

  1. Download the Task Parallel Library for .NET 3.5 and put “System.Threading.dll” into the folder “Assets\Plugins\x86”
  2. Download XInputDotNet for Unity and put “XInputDotNetPure.dll” and “XInputInterface.dll” into the folder “Assets\Plugins\x86”
  3. Put the files situated in the directory “Assets\Plugins\x86\FFmpeg” into the directory of unity editor (e.g C:\Program Files (x86)\Unity\Editor). Otherwise unity is not able to find these secondary libraries. If you compile the application, then those files have also to be placed in the directory where the exe file of the application is situated.
  4. (Optional) – Delete the Camera GameObject and follow these instructions to integrate the oculus rift. Place the OVRCameraController gameobject at a suited position (where the head of the pilot would be most likely).

Changes on the AR.Drone C#-Framework

  • StopWatch.Restart() replaced by StopWatch.Reset() and StopWatch.Start() in:

    • AR.Drone.Client\Command\CommandSender.cs
    • AR.Drone.Client\Configuration\ConfigurationAcquisition.cs
    • AR.Drone.Client\Navigation\NavdataAcquisition.cs
  • added AR.Drone.Client\EnumHelper.cs (source) containing TryParse method. Resulting Changes:

    • replaced Enum.TryParse(parts[0], out type) in AR.Drone.Client\Configuration\FlightAnimation.cs by EnumHelper.TryParseEnum(parts[0], out type)
    • replaced Enum.TryParse(parts[0], out type) in AR.Drone.Client\Configuration\LedAnimation.cs by EnumHelper.TryParseEnum(parts[0], out type)
    • replaced Enum.TryParse(parts[0], out type) in AR.Drone.Client\Configuration\UserboxCommand.cs by EnumHelper.TryParseEnum(parts[0], out type)
  • added AR.Drone.Data\EnumExtensions.cs containing HasFlag method (source)

License

Copyright 2014 Matthias Weise matthiasweise@online.de

GNU Lesser General Public License (LGPL) version 3 or later.
http://www.gnu.org/licenses/lgpl.html

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.4%
  • GLSL 1.6%