This fork of the Crazyflie Python library includes the Crazyflie CRTP link driver (sim driver) for the ROS2 Gazebo Crazyflie Flight Simulator sim_cf2 https://github.com/CrazyflieTHI/sim_cf2
Download posix_ipc module for python
pip install posix-ipc
The sim driver is always initialized when calling
cflib.crtp.init_drivers()
If no radio dongle is attached to the computer, the sim driver will be loaded and an connection to a simulated Crazyflie can be established.
When initializing the CRTP drivers, set enable_sim_driver
to true
to exclusively load the sim driver.
cflib.crtp.init_drivers(enable_sim_driver=True)
Addresses and their corresponding link_uri
are hard coded in the sim driver. Scanning for address 0xE7E7E7E701 will return the link_uri
'radio://0/80/2M/E7E7E7E701'
linkUris = {
0xE7E7E7E701:'radio://0/80/2M/E7E7E7E701',
0xE7E7E7E702:'radio://0/80/2M/E7E7E7E702',
0xE7E7E7E703:'radio://0/80/2M/E7E7E7E703',
0xE7E7E7E704:'radio://0/80/2M/E7E7E7E704',
0xE7E7E7E705:'radio://0/80/2M/E7E7E7E705',
0xE7E7E7E706:'radio://0/80/2M/E7E7E7E706',
0xE7E7E7E707:'radio://0/80/2M/E7E7E7E707',
0xE7E7E7E708:'radio://0/80/2M/E7E7E7E708',
0xE7E7E7E709:'radio://0/80/2M/E7E7E7E709',
0xE7E7E7E70A:'radio://0/80/2M/E7E7E7E70A'
}
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 Crazyflie PC client uses the cflib.
See below for platform specific instruction. For more info see our documentation.
See the installation instructions in the github docs folder.
Check out the Bitcraze crazyflie-lib-python documentation on our website.
Go to the contribute page on our website to learn more.
Run the automated build locally to test your code
python3 tools/build/build