/crazyflie-lib-python

Python library to communicate with Crazyflie

Primary LanguagePythonOtherNOASSERTION

cflib: Crazyflie python library Build Status

cflib is an API written in Python that is used to communicate with the Crazyflie and Crazyflie 2.0 quadcopters. It is intended to be used by client software to communicate with and control a Crazyflie quadcopter. For instance the cfclient Crazyflie PC client uses the cflib.

For more info see our wiki.

Installation

See bellow for platform specific instruction.

In this section you should replace python by the version you are using (usually either python2 or python3). Installing for cfclient requires python3

The only dependency is pyusb:

python -m pip install "pyusb>=1.0.0b2"

To install cflib as a system-wide library (as root):

python setup.py install

To install cflib as a system-wide library (as user):

python -m pip install --user -e .

To install cflib in development mode where you can then edit the code on place:

python -m pip install -e .

To uninstall any of the above:

python -m pip uninstall cflib

Examples

Examples on how to use cflib to communicate with Crazyflie can be found in the example folder. To run the example you should install cflib following the installation section.

Platform notes

Linux

Setup script

To install the Crazyflie PC client in Linux, you can run the setup script with:

sudo setup_linux.sh

This will install the Crazyflie lib system-wide, create a udev entry for the Crazyradio and setup the permissions so that the current user can use the radio without root permissions after restarting the computer.

Contribute

Everyone is encouraged to contribute to the CrazyFlie library by forking the Github repository and making a pull request or opening an issue.