Git Product home page Git Product logo

unity-drone-controller's Introduction

Unity Drone Controller

The idea behind this project is to share a set-up for robotics simulation in Unity. At the time of this writing, this is simply a Unity-based drone controller—in particular a DJI F450 controller written in C#—which can be controlled by any joystick you'd like; although, it's been only tested with a PS4 controller (it's pretty easy to set up a different one).

Keep in mind it's a very basic implementation, inspired by other people, in which you can control the drone's altitude and orientation with the joystick sticks. Feel free to improve it!

Requirements

To start running this project you need to fulfil a few steps. Firstly, you've got to have Unity installed (obviously), and secondly, you should download the Art for the models. There are only two models in the scene, the DJI F450 drone and the ground to collide with.

DJI F450 Drone

The model was downloaded from here (thanks Matheus Monteiro). However, there are some caveats to use the model directly. If you import either Collada or SketchUp files, the model won't be complete. So I fixed it and exported a Unity package based on a FBX file. Download it from this link.

DJI F450 Image

Ground

The ground is basically a 2D GameObject (a plane) with some texture on it. Be sure to download the materials and the texture folders from here. You can place both Material/ and Textures/ folders within Art/Ground for instance. Thanks Indie Pixel for the cool textures.

PS4 Controller

The PS4 controller is connected directly by pairing it with a computer. Once you've confirmed that the OS has recognized the device you just need to install the Unity Package called "Input System". It can be installed via the package manager in Unity.

New Input System Image

The configuration for the drone inputs can be found this directory.

Future work

There are a few things that can be done based on this project.

  1. Improve the physics of the drone.
  2. Integrate Unity with ROS and implement algorithms to automatically control the drone (e.g. hovering).
  3. Add a camera view to the GoPro Hero 4.
  4. Create a more realistic scene around the model to make a better simulation.

unity-drone-controller's People

Contributors

alvgaona avatar

Watchers

 avatar

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.