Tuning crazyflie for smooth, stable and responsive flight

Firmware/software/electronics/mechanics
Call_me_a_Cab
Member
Posts: 51
Joined: Wed Dec 17, 2014 12:56 pm

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by Call_me_a_Cab »

Erm, really basic question here....

Where is "config.mk"? :oops:
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by chad »

Call_me_a_Cab wrote:Erm, really basic question here....

Where is "config.mk"? :oops:
Hi @Call_me_a_Cab, there is a sample one (config.mk.example) in crazyflie-firmware/tools/make. You can either use that one and rename it config.mk or just create a new file called config.mk and add the parameter. The main Makefile in the crazyflie-firmware directory will pick it up from crazyflie-firmware/tools/make.
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.
Call_me_a_Cab
Member
Posts: 51
Joined: Wed Dec 17, 2014 12:56 pm

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by Call_me_a_Cab »

Thanks Chad,

I read that and thought... Yeah that makes some sense..

However, within the VM 0.8 in eclipse in crazyflie-firmware I do not have a tools folder!?

God this is coming difficultly to me haha
nanobot9000
Beginner
Posts: 26
Joined: Mon Apr 11, 2016 4:33 pm

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by nanobot9000 »

I noticed the same thing. I copied a tools folder from one of the other projects and put it in the firmware project. Not sure why there is not a tools folder or if what I did was OK, but I think it worked.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by chad »

No sweat. I think the 0.8 VM has aged out a bit and the crazyflie-firmware is on the wrong branch. Try this:

In the crazyflie-firmware directory:

Code: Select all

git branch
It might say "crazyflie2". If so, do this:

Code: Select all

git checkout master
git pull
git branch
It should say "master". Then, check and see if you have the directory.
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.
Call_me_a_Cab
Member
Posts: 51
Joined: Wed Dec 17, 2014 12:56 pm

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by Call_me_a_Cab »

Sorted!

Thanks a lot :)
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by theseankelly »

I'm so glad this has been useful! PID tuning is more of a dark art than a science. Lots of guess and test. I encourage everyone to play with the params and see how they affect flight. I'm certain there's a better set of coefficients than what I came up with!!
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
nanobot9000
Beginner
Posts: 26
Joined: Mon Apr 11, 2016 4:33 pm

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by nanobot9000 »

Thanks for the tip on pulling down the updated master - that fixed the missing tools folder for sure.

I am new to this git business and am enjoying learning. I do have what is probably a silly question, but after I create the config.mk with the appropriate statement how do I know for sure that the build was correct aside from the behavior once I load it? Is there some number in this example that tells me it used my config.mk as part of enabling the experimental PID?

Code: Select all

Crazyflie 2.0 build!
Build 97:c2a88215d5dd (2016.02-97) CLEAN
Version extracted from git
Crazyloader build!
   text	   data	    bss	    dec	    hex	filename
  99784	   1668	  35956	 137408	  218c0	cf2.elf
rm version.c
bitcraze@bitcraze-vm:~/projects/crazyflie-firmware$ 
Thanks,
Mike
liwanggt
Beginner
Posts: 5
Joined: Thu Apr 14, 2016 3:43 pm

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by liwanggt »

I have noticed that the VM is on the "crazyflie2 branch" by default, rather than the "master branch". I also noticed that the crazyflie 2.0 I recently bought came with the "crazyflie2 branch" firmware. My question is: what is the difference between those two branches in terms of attitude estimation and control algorithms.

From the hovering experiments I performed using Crazyflie ROS driver and Optitrack, I found the "crazyflie2 branch" firmware performing slightly better than the "master branch" firmware. The difference is observed when I tried to make it hover at a fixed point. I haven't tested their difference in following given trajectories yet.

Li

chad wrote:No sweat. I think the 0.8 VM has aged out a bit and the crazyflie-firmware is on the wrong branch. Try this:

In the crazyflie-firmware directory:

Code: Select all

git branch
It might say "crazyflie2". If so, do this:

Code: Select all

git checkout master
git pull
git branch
It should say "master". Then, check and see if you have the directory.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Tuning crazyflie for smooth, stable and responsive flight

Post by chad »

@liwanggt

The VM is a little old now. The crazyflie2 branch was for initial work on the Crazyflie 2. Once the Crazyflie 2 and Crazyflie Nano (1.0) firmwares were merged, all work continued on master. The last commit on the crazyflie2 branch was back on Jul 20, 2015 - nearly a year ago!

There are significant differences between the two branches - crazyflie2 is 286 commits behind the master branch! You can look through the comparison on GitHub.
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.
Post Reply