Host applications and library for Crazyflie written in Python.
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
The Crazyflie PC client enables flashing and controlling the Crazyflie. It implements the user interface and high-level control (for example gamepad handling). The communication with Crazyflie and the implementation of the CRTP protocol to control the Crazflie is handled by the cflib project.
For more info see our documentation.
The client can be installed and run with snap, it can be found on snapcraft (ie. search Crazyflie in Ubuntu software) or installed from command line:
snap install --edge cfclient snap connect cfclient:raw-usb # Required to access the Crazyradio snap connect cfclient:joystick # Required to access gamepads
The only build available right now is the latest commit from github (edge), the next version will be pushed in the snapcraft stable channel.
It is still required to set the udev permission with the snap, see the last section of this page.
A windows installer is automatically built for each git commit in appveyor.
For each release, the release built is available in the github release page.
To use Crazyradio you will have to install the drivers.
Each release of the client is pushed to the pypi repository. If you have python >= 3.5, it can be installed with pip:
python3 -m pip install cfclient pyqt5
Mac and windows will also need the SDL2 library to be installed (see bellow)
The Crazyflie client requires cflib. If you want to develop with the lib too, follow the cflib readme to install it.
Running from source on Windows is tested using the official python build from python.org. The client works with python version >= 3.5. The procedure is tested with 32bit python. It should work with 64bit python but since it is not tested it can be broken (if so, do not hesitate to send a fix ;-).
To run the client you should install python, make sure to check the "add to path" checkbox during install. You should also have git installed and in your path. Use git to clone the crazyflie client project.
Open a command line window and move to the crazyflie clients folder (the exact command depends of where the project is cloned):
Download the SDL2.dll windows library:
Install the client in development mode:
pip install -e .[dev,qt5]
You can now run the clients with the following commands:
cfclient cfheadless cfloader cfzmq
NOTE: To use Crazyradio you will have to install the drivers
Pycharm is an IDE for python. Any Python IDE or development environment will work for the Crazyflie client. To work on the Crazyflie firmware with Pycharm, install pycharm community edition and open the Crazyflie client folder in it. Pycharm will automatically detect the python installation.
To run the client, open and run the file
You are now able to edit and debug the python code. you can edit the .ui files for the GUI with QtCreator. You can the Qt development kit from the Qt website and open the .ui files in QtCreator.
When you are able to run from source, you can build the windows executable and installer.
First build the executable
python setup.py build
Now you can run the client with
choco install nsis.portable -version 2.50, otherwise you can just download it and install it manually.
To create the installer:
python win32install\generate_nsis.py makensis win32install\cfclient.nsi
Unlike for Windows, there is no build for mac yet. It should be possible to package the client as a mac app and help is wanted. In the mean time you can run the client by installing python and pulling the client python package.
The easiest to get the client running on Mac if you do not already have Homebrew installed is to use the official Python distribution. If you are using Homebrew look at the next section. If you are using Anaconda/Conda, the procedure should be very similar but you can skip the python installation.
python3 -m pip install cfclient[qt5] pysdl2. This will install the latest release.
You can now launch the client with
python3 -m cfclient.gui
If you want to develop and modify the client, you can clone this repos, uninstall cfclient with
python3 -m pip uninstall cfclientand install it in development mode by navigating into the repos root folder and installing the client in edit mode:
python3 -m pip install -e ..
IMPORTANT NOTE: The following will use Homebrew and its own Python distribution. If you have a lot of other 3rd party python stuff already running on your system they might or might not be affected by this.
Install the brew bottles needed
brew install python3 sdl sdl2 sdl_image sdl_mixer sdl_ttf libusb portmidi pyqt5
Install the client
* If you only want to use the client to fly the Crazyflie and don't care about coding ``` pip3 install cfclient ```
If you want to develop on cflib as well, install cflib from https:
pip3 install -e .
If you want to develop with the lib, install cflib from https://github.com/bitcraze/crazyflie-lib-python
Cfclient requires Python3, pip and pyqt5 to be installed using the system package manager. For example on Ubuntu/Debian:
sudo apt-get install python3 python3-pip python3-pyqt5 python3-pyqt5.qtsvg
Install cfclient to run it from source. From the source folder run (to install for your user only you can add
--userto the command):
pip3 install -e .To launch the GUI application in the source folder type:
To launch the GUI after a systemwide installation, execute
The Crazyflie PC client has the following dependencies:
Using Crazyradio on Linux requires that you set udev permissions. See the cflib readme for more information.