GithubHelp home page GithubHelp logo

trellixvulnteam / droneengineeringecosystem_99uh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miguelvalero/droneengineeringecosystem

0.0 0.0 0.0 132.89 MB

Shell 0.01% JavaScript 0.02% C++ 0.31% Python 95.16% C 2.19% Emacs Lisp 0.01% Java 0.02% Fortran 0.02% Tcl 1.30% C# 0.03% PowerShell 0.01% XSLT 0.16% CSS 0.10% TeX 0.01% Swift 0.05% HTML 0.11% GLSL 0.01% Batchfile 0.01% Cython 0.49% Vim Script 0.01%

droneengineeringecosystem_99uh's Introduction

Drone Engineering Ecosystem

software-arch

General description

The Drone Engineering Ecosystem is a software tool that allows controlling the operation of various types of drones. It allows to establish flight plans, record flight data and manage the information collected.

The ecosystem contanis several modules, that are briefly descrived in the following.

  • Dashboard: a desktop application that allows the global control of the system. from the dashboard the user can select the drone platform, control de drone operation and manage the data involved in the mission.

  • Movile app: an app for smartphones that implements a subset of the functionalities of the dashboard.

  • Autopilot service: an on board module that controls the autopilot to execute the commands coming form the Dashboard or the Movile app (arm, takeoff, go to position, etc.)

  • Camera service: an on board module that controls the on board camera to execute the commands coming form the Dashboard or the Movile app (take a picture, get the video stream, etc.)

  • LEDs service: an on board module that controls the LEDs of the drone platform to inform on the status ot the drone platform, as required by other modules.

  • gate: connects the on board modules with the external modules.

  • Local broker: on board middleware that connects the on board modules through publications and subscriction.

  • Global broker: middleware that connects the gate with the external modules through publications and subscriction.

  • API Rest: a server that provides data storage and retrieval through HTTP basic operations (GET, POST, PUT, DELETE).

  • Data service: provides the requiered by the rest of modules interface to access data in the API Rest via publications and subscriptions.

The Mission Planner module that appears in the figure does not belong to the Ecosystem, but is used for development purposes, since it provides an autopilot simulator, so that the ecosystem can be developed and tested without requiring a real drone platform.

Demo

Drone Engineering Ecosystem demo

Dasboard

The dashboard is implemented in Python using Tkinter, that is a library to develop graphic user interfaces (GUI).
A nice course on Tkinter can be found here:
Tkinter

Mobile app

The mobile app is implemented in Python using Kivy, that is another library to develop GUI, but more suitable for mobile devices. A nice course on Kivy can be found here:
Kivy

Brokers

Both the local and the global brokers use the MQTT protocol based on publication-subscription mechanism. Are implemented using Mosquitto, that automatically generates the broker.
In the development environment, both the local and the global broker are run in the localhost, the global broker in port 1884 and the local broker in port 1883.
The basics of MQTT can be found here:
MQTT
More information about Mosquitto and how to install it in Windows and in Linux can be found here.
Mosquitto
This is a good example to start using MQTT (using a public broker):
Exanple

API Rest

The API Rest module has been build using the Flask framework. A very simple and clear example on how to use Flask (in Spanish) can be found here:
Flask

Suporting materials

Transversal project guide
Deploy the APP in an Android Mobile Phone

Tools required

Git and GitHub

We use Git and GitHub to have the software available to everybody in the cloud, to manage different versions of the software and to organice the integration of the contributions of different participants in the project.
Create a GitHub account if you do not have one.
GitHub
Install git in your computer.
Git
It is not recommended to install Gui Client because most of the times if you are a developer you may want to work with command lines instead of GUI programs.
Run these commands in a terminal, for some initial configurations:

git config --global user.name "Your name"
git config --global user.email [email protected]

Mosquitto

Download Mosquitto broker:
Mosquitto

In the folder where mosquitto has been downloaded, create two configuration files named "mosquitto1883.conf" and "mosquitto1884.conf". Include the following lines in these files:
In "mosquitto1883.conf", that will be the local borker:

listener 1883
allow_anonymous true

In "mosquitto1884.conf", that will be the global broker:

listener 1884
allow_anonymous true

You can start running the local broker with this command (from a terminal opened in the mosquitto folder):

 .\mosquitto -c mosquitto1883.conf

Do the same to start the global broker, from another terminal.

Mission Planner

Download and install the latest Mission Planner installer:
Mission Planner

Python

You will need two versions of Python: python2.7 for the autopilot module and python3.7 for the rest:
python3.7
python2.7

PyCharm

PyCharm is the recommended IDE for development in Python.
PyCharm

Configure the system interpreter (the versions of python to be used). See this guide:
Configure interpreter

You will have to install some packages during development. Look at this guide for this:
Installing packages

Drone Engineering Ecosystem installation

Follow these steps:

Log in in your GitHub account. Then make a fork from the Drone Engineering Ecosystem repository. Now you have a copy of the original repository in your account. We will refer to this repository as "forked".
How to fork

Clone the forked repository in your computer:

   git clone (URL of forked)

Now you have created the "local" repository. The system has created a connector between the local repository and the original. The connector is named "origin". See this with this command:

   git remote -v

Now change the the name of the connector:

   git remote rename origin forked

Create a new connector between the local repository and the original:

    git remote add origin https://github.com/miguelvalero/DroneEngineeringEcosystem

Check that now you have two connectors: "forked" connects your local repository with the forked one, and "origin" connects the local with the original:

   git remote -v

Procedure for contributions

Contributions must be integrated in the original repo only after exhaustive test of correctness.

These are the steps for contributing, assuming that you have cloned the projects, as indicated in the previous section.

  1. Create a branch for your developments:
  git checkout –b dev
  1. Develop whatever you want to develop, and test until you are sure that everything is correct.

  2. Commit the changes:

  git add .
  git commit –m “Description of your development”
  1. Push the changes to your forked repo:
  git push forked dev
  1. From the dev branch of forked repo, make a pull request to integrate the changes into origin. It is important to make sure that the changes are integrated into the main branch of origin. Clearly describe the developments made. When making the pull request, it will be indicated if there are conflicts or not. If there are no conflicts accept the pull request. If there is a conflict then try to resolve the conflicts or contact one of the responsible teachers if you have difficulties to do so.

  2. Download in your local repo the result of the integration:

  git checkout main
  git pull origin main
  1. Check that everything is running ok in the new version (which may contain recent developments from other contributors).

  2. Unload the new version to your forked repo:

  git push forked main
  1. Remove development branches:
   git branch -d dev
   git push forked --delete dev

droneengineeringecosystem_99uh's People

Contributors

glloveras avatar miguelvalero avatar trellixvulnteam 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.