This page is intended to give an overview on how to use the Crazyflie client, not for installing it. For install instructions go here.
The Crazyflie client is used for controlling the Crazyflie, flashing firmware, setting parameters and logging data. The main UI is built up of a number of tabs, where each tab is used for a specific functionality.
How to get flying
- Start up the application
- Insert the joystick and Crazyradio (PA)
- Before you connect to the Crazyflie make sure that the joystick is working as expected and that the thrust is zero. The joystick values should be visible in the flight data box under target.
- Press Scan
- Wait for the scanning to complete
- In the drop-down menu to the left of the Connect button select the Crazyflie you want to connect to. Connect to the URI e.g. radio://0/80/250k.
- The client will now connect to the Crazyflie and handshake
- When the handshake is done you can start flying the Crazyflie. Remember the most tricky part is the thrust so start out easy...
For more info on LED indicators etc. have a look at the Crazyflie 2.X user guide.
- The window title will show the connection status
Connect/disconnect, scan and the drop-down connection list as well as Address and auto reconnect.
- Scan: Will scan for availible Crazyflies within the chosen address.
- Connect: Will connect to the selected URI in the connection list
- Disconnect: Will disconnect the current Crazyflie
- Address: The address to scan for. If you didn’t change this in the configuration, then leave the default of 0xE7E7E7E7E7
- Battery and link quality (from 0% to 100%)
- Tabs with specific functionality (see below for details)
- The selected and used input interface
- Command based flight control, allow controlled flight if, and only if, a positioning deck such as the Flow deck, the Loco deck or the Lighthouse deck is present.
The main interface is built up of different tabs that can be shown/hidden from the View->Tabs menu.
The following tabs are currently available:
- Flightcontrol Tab
- Plotter Tab
- Parameter Tab
- Log Blocks Tab
- Loco Positioning Tab
- Lighthouse Positioning Tab
- Console Tab
Below are a few guides on how to accomplish specific tasks with the client.
For updating the Crazyflie firmware you can keep being connected to the crazyflie. This will open up a seperate dialog that will guide you through the process. Please note that you need to use a Crazyradio dongle to connect to the Crazyflie when doing firmware upgrades. Upgrading using USB is not possible.
To update the firmware in the Crazyflie 2.X do the following:
- Go to the menu Crazyflie->Bootloader
- Connect to the crazyflie in this dialog, if it is not already connected in the flighttab.
- Select the latest release from the drop down menu or select it if you have downloaded it from the Github release page.
- Click "Program" and wait for both the STM and NRF to be flashed.
- If your crazyflie has a lighthouse deck, the lighthouse deck fpga will be updated too (>= release 2021.03)
- Your crazyflie will automatically restart a couple of times.
- Do not touch or restart your crazyflie untill all flashing is done and you see "status: idle" at the bottom.
- To check the firmware version, under the View menu, open up Tabs->Console tab and look at the output when connecting to the Crazyflie 2.X.
If you accidently restarted your crazyflie during flashing or anything else happend which caused your crazyflie to not start up properly, follow the instructions for recovery mode.
It is possible to set another channel to communicate with the Crazyflie 2.X. It can be wise to do this if there exist other wireless networks that can interfere, especially WiFi. It is also possible to permanently store the trim values for pitch and roll.
It is currently possible to change the following parameters which are stored in a none volatile memory:
- Pitch trim Can be programmed permanently with the trim values found to work good in the flight tab.
- Roll trim Can be programmed permanently with the trim values found to work good in the flight tab.
- Radio channel Can be set to anything between 0 and 125, correspond to a frequency from 2400MHz to 2525MHz. In most countries channel 0 to 80 is OK to use but this should be checked with you local regulations. If using 2M datarate, the copter channels should be 2 apart (2MHz).
- Radio bandwidth This can set the radio bandwidth to 250k, 1M or 2M. A lower bandwidth has longer range but has higher chance of collision. When used inside sometimes it is better to use 1M or 2M as it decreases the risk of collision with WiFi.
- Radio address (advanced) will set the shock burst address used for communicating. Note that if you change this then you will have to set the address correctly in the connect dialog.
The procedure is described below and the parameters can be changed again any time the same way.
First connect to the Crazyflie 2.X with the normal connect button. Then open “Crazyflie->Configure 2.X” to reach the configure 2.X dialog
Once the settings has been made press the write button to save them permanently in the Crazyflie 2.X EEPROM.
The Crazyflie logging framework allows to log the state of Crazyflie variables in real-time. This subsystem is used by the client to show information like pose or battery level.
The list of log variable can be seen in the "log TOC" tab in the client.
Variables are logged in block: one log block is a list of variable that are logged at the same time. You can setup custom log blocks that can be plotted in the plotter and saved to file in the log block tab.
To setup a new log block click on the menu "settings/logging configuration", You then see the following toolbox:
- List of log variable in the Crazyflie
- Log variables in the current log block
- Add the selected Crazyflie log variable in the log block
- Remove the selected log block variable from the log block
- Period at which the variables are sampled and the block is send by the Crazyflie to the client. The minimum possible period is 10ms (100Hz) and it can be set by step of 10ms up to 2550ms.
- Bytes used by the variables in the log block.
- File-tree structure where you can sort the log-blocks into categories.
- Create/delete a category or a log-configuration. This can also be done by right-clicking anywhere in the category-tree.
- Save log block configuration
By using the settings on the Flight control tab you can set things such as the max roll/pitch and thrust.
In order to control the Crazyflie you are connected to you will need some input-device. Normally this would be a gamepad, but any input-device with at least 4 analog axis will do. Here's a list of some input-devices that are used.
In order to make sense of the input from the device a mapping has to be supplied. This mapping will convert raw axis values on the input-device to useful values like roll/pitch/yaw/thrust. There's a few default mappings shipped with the client, but it's easy to create your own.
Creating new mappings
The software comes bundled with mappings for Xbox and PS3/4 controllers, but if you have another input-device then it's quick to create your own configuration. Go to the menu Input device -> Configure device mapping.
Select the device you would like to configure and press Configure.
For each functionality that can be mapped there's a Detect button, by pressing it the following dialog will appear.
Follow the instructions to detect the axis or button that you would like to map to the functionality. If you would like to map the functionality to two axis (like right/left shoulder-button) then select Combined axis detection and follow the instructions.
Go though all the functionality you would like to map by pressing the Detect button for each. To be able to save the mapping you will at least have to map roll, pitch, yaw and thrust.
Once you have mapped functionality you will be able to see the feedback directly in the configuration dialog (when you're not detecting a button). Make sure to check that the response is what you intended. When you are finished with the mapping then enter the map name and press save.
If you would like to start from a previous configuration and change it (either to update or to create a new one) then select the appropriate mapping in the drop-down and press Load. Once you have made the changes you would like to do then either press Save without changing the name to update the mapping or enter a new name and press Save to create a new one.
The current input device and mapping can be selected from the Input device menu.
The Input device menu contains a number of different "modes" that can be used for controlling a Crazyflie. Currently there's thee to choose from. The alternatives will only be enabled if there's enough input devices connected to use them.
- Normal: Just like it says this is the normal mode using only one controller to control a Crazyflie
- Teacher (RP): This mode requires two input-devices, where one will be configured for roll and pitch and the other one for the rest of the functionality. By using the Mux switch functionality (mapped in the configuration) the second controller can take over roll and pitch as well
- Teacher (RPYT): This mode requires two input-devices, where one will be configured for roll, pitch yaw and thrust, and the other one for the rest of the functionality. By using the Mux switch functionality (mapped in the configuration) the second controller can take over roll, pitch, yaw and thrust as well
For normal usage just enter the Normal menu, select the device you would like to use and the correct mapping. As a device is selected the list of mappings are enabled.
If more than one input device is connected then it's possible to switch to one of the teacher modes.
First select the device that should be used for the teacher and then it's mapping.
Then select the device that should be used for the student and then it's mapping.
Once this is done you will be able to see the open devices and configurations at the bottom of the user interface.
The UI is normally used to get/set parameters, view logged data and send control commands to the Crazyflie. Aside from this there's also the possibility to connect via ZMQ to the client and control several things:
- Parameters: Get/set parameters by name
- LED-ring memory: Write LED ring memory
- Input-device: Act as an input device
The benefit of using this approach instead of the stand-alone ZMQ server is that you will not have to take care of everything, just the parts you are interested in for the moment.