Products
-
-
- Accessories
- Breakout boards
This is an old revision of the document!
The Crazyflie PC utilities are developed using Python 2.6. The Crazyflie library is used from the command line tools as well as a graphical user interface.
The following has to be installed for the PC utilities to work:
For the graphical userinterface to work the following is also needed:
The following has been tested on Fedora 16. Note that this will pull in a lot of dependencies.
sudo yum install pygame pyusb PyQt4
The following has been tested on Ubuntu 10.04 and 11.10. Note that this will pull in a lot of dependencies.
sudo apt-get install python2.6 python-usb python-pygame python-qwt5-qt4 python-qt4
In order to fix the permissions so it's possible to use the USB Radio without being root do the following steps.
sudo usermod -a -G plugdev username
Note that you will need to logout and in again for the added group to take effect.
Create a file named /etc/udev/rules.d/99-crazyradio.rules and add the following:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
Needs to be written
A userguide for the GUI application can be found here.
Besides the common bindings nothing has to be installed.
All command line tools used the same link diver model. The link driver to use in order to communicate with the copter is chosen with the -l
command line argument. Also the tools accepts the -h
argument that will display help about the link driver as well as the default driver used if none is provided:
crazyclient$ python gamepadCtrl.py -h CRTP Driver loader options: --------------------------- -l <driver_uri> : Load the link driver with the requested URI -h : Print this help message Unless otherwise specified the URI "radio://0" will be used
The available drivers are:
gamepadctrl.py is the 'legacy' control software for Crazyflie. It works with a playstation 3 gamepad and display rudimentary information about the axis position:
crazyclient$ python gamepadCtrl.py -l radio://0/77
The gamepad mapping is as follow:
Control | Gamepad Key/axis |
---|---|
Pitch | LY |
Roll | LX |
Thrust | RY |
Yaw rate | RX |
Emergency stop | Ps button |
crazyload.py permits to update the copter firmware using the Crazyload radio bootloader. This is a self-documented command line tool (launch python crazyload.py -h
).
To program a copter with a firmware compile in bootloader mode (see build environment documentation):
$ python crazyload.py -c flash cflie.bin
Here cflie.bin is the binary file of the firmware to be flashed. After launching this command the copter has to be restarted and the flash procedure will start. When the flash procedure is finished the copter has to be restarted again and will boot the new firmware.
The bootloader is normally able to automatically reset the copter in bootloader and firmware mode. This functionality requires to know the CPU-ID of the copter (which can be recovered with the command line tool getinfo.py). Knowing the copter CPU id, it can be reprogrammed without manipulation as follow;
$ python crazyload.py -i 32:00:6e:06:58:37:35:32:60:58:01:43 -l radio://0/77 flash cflie.bin
This command is an example that would work if the copter is currently running a crazyflie firmware with radio configured to channel 77.
getinfo.py recovers some information about a running copter. This tool is slightly bugged but fulfills its purpose (mainly getting the copter CPU ID). Its usage is quite classical:
crazyclient$ sudo python getinfo.py -l radio://0/77 Detected CrazyRadio dongle version 0.32 Channel 77 Data rate 2M CPU ID: 52:ff:70:06:48:89:49:53:15:31:10:87 Battery voltage: 3.764599V CrazyCopter version: 0.9.0 Copter class name: CrazyFlie CPU ID: 52:ff:70:06:48:89:49:53:15:31:10:87 crazyclient$