forked from edlib, esp-drone branch
edlib is an API written in Python that is used to communicate with the Espdrone. It is intended to be used by client software to communicate with and control an espdrone quadcopter. For instance the edclient Espdrone PC client uses the edlib.
For more info see esp-drone wiki.
-
Clone the edlib,
git clone https://github.com/NelsenEW/espdrone-lib-python.git
-
Install dependencies required by the lib:
pip install -r requirements.txt
-
Install the edlib in editable mode:
pip install -e .
-
Uninstall the edlib if you don't want it any more,
pip uninstall edlib
This section contains a very short description of how to use virtualenv (local python environment) with package dependencies. If you don't want to use virualenv and don't mind installing edlib dependencies system-wide you can skip this section.
-
Install virtualenv:
pip install virtualenv
-
create an environment:
python -m virtualenv venv
-
Activate the environment:
cd venv/Scripts && activate.bat
-
To deactivate the virtualenv when you are done using it
deactivate
Note: For systems that support make, you can use make venv
to
create an environment, activate it and install dependencies.
There are several examples under the examples
directory that can be run with the following command:
python[3] path/to/example_file.py [--uri ip]
e.g. python examples/basiclog.py --uri 192.168.0.105
Note: If the optional argument [--uri] is not used, the computer will search for available drone(s) and select the lowest IP
Here is the list of the working examples:
- basiclog.py - Log the drone roll, pitch, yaw asynchronously.
- basicparam.py - Get the value of each parameters inside the drone, and set the pitch derivative gain controller to a random number
- basiclogSync.py - Log the drone roll, pitch yaw synchronously
- camera_example.py - Get the camera stream from the drone and show it on an opencv window
- multilog.py - Log mutliple drones roll, pitch, yaw asynchronously
- multiramp.py - Ramp multiple drones motor