Runs on the drone and creates a connection between the drone software and the core service.
- Everything is ran with
python3
, make sure you have the right version. - Install paho mqtt client: reference.
- Install
dronekit
: reference. - Install
python-dotenv
: reference. - Install
attrs
version >=18.1.0
The environment variables in the .env
file are secret and should not be shared.
TLDR: To start service locally
- Start drone, run
dronekit-sitl copter
in terminal. - 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": {}
}
}