Hello! I am working on a project for a class designing a program for the crazyflie to autonomously hover and, if time permits in the semester, to fly a pre-programmed path autonomously.
However, I'm having trouble navigating through the bitcraze wiki and other associated sites with regards to the developing environment and software downloads that are necessary to operate the crazyflie/flash to the crazyflie. I plan on using Eclipse to write my code in C, will be working in a Linux or OS X environment (havent decided which one yet), and will be using the radio dongle to turn the crazyflie off/on/act as a kill-switch if the copter has a serious glitch mid-flight. I also plan on using the gyro and accelerometer, and I've seen this forum has TONS of information on how to read the sensors, adjust the motors, etc.
The problem: I'm extremely unsure what software packages I actually need to download to even start programming the control system for my project.
Are there any links (or maybe previous forum posts) that can provide some direction for me? The bitcraze wiki page is helpful to some degree (i.e. what to do AFTER all necessary software is downloaded but not HOW/WHAT to download) but I'm lost in the sheer amount of information on that website.
Thank you for any help that can be provided!
Caitlin
New to Crazyflie - Help with software download, developing environment
Re: New to Crazyflie - Help with software download, developing environment
Hi Caitlin, welcome to the forum.
You've certainly bitten off quite a lot for your project! There's going to be some work for you here. In any case, I think I can help point you in the right direction to get started. I'm assuming you have a Crazyflie 2. If not, let me know as some of these steps will change.
Software you'll need:
There's a lot of software used in the Crazyflie system. To start doing some hacking, you'll really only need to deal with a couple pieces. Here are the ones to look into. These are hosted on GitHub at the links I provided so a working understanding of git (and in general version control) might help you here but it isn't absolutely necessary.
-) crazyflie-firmware - This is the "brains" of the Crazyflie itself, the firmware for the STM32 MCU on the PCB airframe.
-) crazyflie-clients-python - This is the GUI "ground-control" application. It interfaces with the Crazyradio and a controller (PS3, software, LeapMotion, etc...) to "talk" to the Crazyflie.
First off, for flying and general development, you'll probably want to get the Bitcraze 0.6 VM. The dev environment is set up on that VM already and all the software is already installed. Eclipse is already configured. It's the fastest way for you to get going. The VM has aged a bit so some things need updating. The first thing you'll want to do is change the crazyflie-firmware repository to the master branch. You can do it in the Terminal application like this:
You also "might" want to change the crazyflie-clients-python repository to the develop branch. It's a little more cutting edge, but still stable. This is optional. I like the develop branch but you can stay on master if you want.
Then you'll want to double-click the "Update all projects" script on the Desktop to run it and freshen up all the sources. That's about it to get everything updated. The two software packages I listed above are all in the "~/projects" directory. Have a look at the Crazyflie client wiki page to understand its use and browse the code to get a handle on how the client controls the Crazyflie. Finally, look at the README files in those two repository directories for good info. Also, in the crazyflie-clients-python repository there is an "examples" directory with script files that will help you understand how to control the Crazyflie with software (ramp.py, basic log.py, basicparam.py, etc...)
If you'd rather do this stuff on Mac, I've written a few tutorials on my Crazyflie blog that might be of some use. For getting the dependencies set up and running the GUI client (crazyflie-clients-python) this post is good. To get a development environment set up, this is the post you'll want to read. Finally, to get Eclipse set up for the projects, check out this post.
Now, about your goals. Not to dissuade you, but what you want to achieve is quite hard. The Crazyflie does not have a GPS so it doesn't "know" where it is in space. Giving it a pre-defined flight path will be pretty hit and miss because variations in ambient temperature, air currents, and other environmental disturbances will lead to changes in the flight path you might have a hard time accounting for and correcting. To make the Crazyflie a little more aware, some people have used Kinect (depth-sensing) cameras and there is currently a local-positioning system (LPS) in its infancy. Without some ways to help the Crazyflie know where it is in space, the flight path goal will be tough.
As far as the languages you'll need to use, the crazyflie-firmware is written in C but the crazyflie-clients-python is written in, well, python. There is a ZMQ backend in the client so you could write a C controller to interface with the client through ZMQ. That crazyflie-clients-python examples directory also has ZMQ examples as well...
Post back if you have more questions and good luck and have fun!
You've certainly bitten off quite a lot for your project! There's going to be some work for you here. In any case, I think I can help point you in the right direction to get started. I'm assuming you have a Crazyflie 2. If not, let me know as some of these steps will change.
Software you'll need:
There's a lot of software used in the Crazyflie system. To start doing some hacking, you'll really only need to deal with a couple pieces. Here are the ones to look into. These are hosted on GitHub at the links I provided so a working understanding of git (and in general version control) might help you here but it isn't absolutely necessary.
-) crazyflie-firmware - This is the "brains" of the Crazyflie itself, the firmware for the STM32 MCU on the PCB airframe.
-) crazyflie-clients-python - This is the GUI "ground-control" application. It interfaces with the Crazyradio and a controller (PS3, software, LeapMotion, etc...) to "talk" to the Crazyflie.
First off, for flying and general development, you'll probably want to get the Bitcraze 0.6 VM. The dev environment is set up on that VM already and all the software is already installed. Eclipse is already configured. It's the fastest way for you to get going. The VM has aged a bit so some things need updating. The first thing you'll want to do is change the crazyflie-firmware repository to the master branch. You can do it in the Terminal application like this:
Code: Select all
cd ~/projects/crazyflie-firmware
git checkout master
git pull
Code: Select all
cd ~/projects/crazyflie-clients-python
git checkout develop
git pull
If you'd rather do this stuff on Mac, I've written a few tutorials on my Crazyflie blog that might be of some use. For getting the dependencies set up and running the GUI client (crazyflie-clients-python) this post is good. To get a development environment set up, this is the post you'll want to read. Finally, to get Eclipse set up for the projects, check out this post.
Now, about your goals. Not to dissuade you, but what you want to achieve is quite hard. The Crazyflie does not have a GPS so it doesn't "know" where it is in space. Giving it a pre-defined flight path will be pretty hit and miss because variations in ambient temperature, air currents, and other environmental disturbances will lead to changes in the flight path you might have a hard time accounting for and correcting. To make the Crazyflie a little more aware, some people have used Kinect (depth-sensing) cameras and there is currently a local-positioning system (LPS) in its infancy. Without some ways to help the Crazyflie know where it is in space, the flight path goal will be tough.
As far as the languages you'll need to use, the crazyflie-firmware is written in C but the crazyflie-clients-python is written in, well, python. There is a ZMQ backend in the client so you could write a C controller to interface with the client through ZMQ. That crazyflie-clients-python examples directory also has ZMQ examples as well...
Post back if you have more questions and good luck and have fun!

Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
Re: New to Crazyflie - Help with software download, developing environment
chad wrote:Hi Caitlin, welcome to the forum.
You've certainly bitten off quite a lot for your project! There's going to be some work for you here. In any case, I think I can help point you in the right direction to get started. I'm assuming you have a Crazyflie 2. If not, let me know as some of these steps will change.
Software you'll need:
There's a lot of software used in the Crazyflie system. To start doing some hacking, you'll really only need to deal with a couple pieces. Here are the ones to look into. These are hosted on GitHub at the links I provided so a working understanding of git (and in general version control) might help you here but it isn't absolutely necessary.
-) crazyflie-firmware - This is the "brains" of the Crazyflie itself, the firmware for the STM32 MCU on the PCB airframe.
-) crazyflie-clients-python - This is the GUI "ground-control" application. It interfaces with the Crazyradio and a controller (PS3, software, LeapMotion, etc...) to "talk" to the Crazyflie.
First off, for flying and general development, you'll probably want to get the Bitcraze 0.6 VM. The dev environment is set up on that VM already and all the software is already installed. Eclipse is already configured. It's the fastest way for you to get going. The VM has aged a bit so some things need updating. The first thing you'll want to do is change the crazyflie-firmware repository to the master branch. You can do it in the Terminal application like this:You also "might" want to change the crazyflie-clients-python repository to the develop branch. It's a little more cutting edge, but still stable. This is optional. I like the develop branch but you can stay on master if you want.Code: Select all
cd ~/projects/crazyflie-firmware git checkout master git pull
Then you'll want to double-click the "Update all projects" script on the Desktop to run it and freshen up all the sources. That's about it to get everything updated. The two software packages I listed above are all in the "~/projects" directory. Have a look at the Crazyflie client wiki page to understand its use and browse the code to get a handle on how the client controls the Crazyflie. Finally, look at the README files in those two repository directories for good info. Also, in the crazyflie-clients-python repository there is an "examples" directory with script files that will help you understand how to control the Crazyflie with software (ramp.py, basic log.py, basicparam.py, etc...)Code: Select all
cd ~/projects/crazyflie-clients-python git checkout develop git pull
If you'd rather do this stuff on Mac, I've written a few tutorials on my Crazyflie blog that might be of some use. For getting the dependencies set up and running the GUI client (crazyflie-clients-python) this post is good. To get a development environment set up, this is the post you'll want to read. Finally, to get Eclipse set up for the projects, check out this post.
Now, about your goals. Not to dissuade you, but what you want to achieve is quite hard. The Crazyflie does not have a GPS so it doesn't "know" where it is in space. Giving it a pre-defined flight path will be pretty hit and miss because variations in ambient temperature, air currents, and other environmental disturbances will lead to changes in the flight path you might have a hard time accounting for and correcting. To make the Crazyflie a little more aware, some people have used Kinect (depth-sensing) cameras and there is currently a local-positioning system (LPS) in its infancy. Without some ways to help the Crazyflie know where it is in space, the flight path goal will be tough.
As far as the languages you'll need to use, the crazyflie-firmware is written in C but the crazyflie-clients-python is written in, well, python. There is a ZMQ backend in the client so you could write a C controller to interface with the client through ZMQ. That crazyflie-clients-python examples directory also has ZMQ examples as well...
Post back if you have more questions and good luck and have fun!
This is AWESOME. Thank you so much for the direction! I probably won't end up designing it to fly a pre-planned path due to time constraints, but it would certainly be an interesting, challenging project to work on.
Unfortunately, I do have the Crazyflie Nano (sorry I forgot to specify which one I had)! Would you be able to tell me which steps would change when working with the Nano? Also, would you recommend using Linux over Mac? I dont really have a preference because I have OS X, Ubuntu, and Windows on my computer, but I understand sometimes one OS can be better than another depending on the project (although I do have a Mac and am running the other OS on VirtualBox, so I am more familiar with OS X in general)...
Thanks again!
Caitlin
Re: New to Crazyflie - Help with software download, developing environment
Hi Caitlin,
What I wrote will work with the Crazyflie Nano (1.0). I anticipated writing more but didn't since I'd already written you a book. What I was going to add is how to "make" the firmware but I figured you'd find it on my blog or in the README files. In any case, when building firmware for the CF1, you need to make sure you pass PLATFORM=CF1 to the Makefile for both compiling and flashing (if you flash over-the-air with the Crazyradio via command line). So:
You'll also want to use the latest firmware when you're using the latest client just to be sure you don't have any weird issues.
I hope you can start building out what you want now.
What I wrote will work with the Crazyflie Nano (1.0). I anticipated writing more but didn't since I'd already written you a book. What I was going to add is how to "make" the firmware but I figured you'd find it on my blog or in the README files. In any case, when building firmware for the CF1, you need to make sure you pass PLATFORM=CF1 to the Makefile for both compiling and flashing (if you flash over-the-air with the Crazyradio via command line). So:
Code: Select all
make PLATFORM=CF1
make cload PLATFORM=CF1
I hope you can start building out what you want now.

Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.