sonervergon / drone-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drone service

Runs on the drone and creates a connection between the drone software and the core service.

Prerequisites

  1. Everything is ran with python3, make sure you have the right version.
  2. Install paho mqtt client: reference.
  3. Install dronekit: reference.
  4. Install python-dotenv: reference.
  5. Install attrs version >= 18.1.0

Instructions

The environment variables in the .env file are secret and should not be shared.

TLDR: To start service locally

  1. Start drone, run dronekit-sitl copter in terminal.
  2. Start drone service, run python3 __init__.py from root.

Sample data to arm drone:

{
  "name": "INSTRUCTION",
  "payload": {
    "action": "MODE",
    "payload": "GUIDED"
  }
}
{
  "name": "INSTRUCTION",
  "payload": {
    "action": "ARM",
    "payload": {}
  }
}

About


Languages

Language:Python 97.8%Language:Shell 2.2%