Page 1 of 1

Stabilizer explanation

Posted: Thu Jan 16, 2020 7:09 pm
by RyanMco
Hi guys!
May please someone explain to me in detail why I need stabilizer.c in my firmware and what its purpose? how it's built? what're the major functions that I need from stabilizer and what are their role? primarily Im asking because Im going to make my own stabilizer which I want to make it like bit craze stabilizer analogy ..
I will make sure to upload my stabilizer.c here in the forum once I finish it.

I need please a thoughtfully explanation about functions there and what are the purpose of stabilizer in general?! thanks alot!
here's the code of bitcraze stabilizer.c: ... abilizer.c

Re: Stabilizer explanation

Posted: Thu Jan 16, 2020 7:11 pm
by RyanMco
Also how it's related to my drone, what this file is going to affect my drone on what?!

Re: Stabilizer explanation

Posted: Sat Jan 18, 2020 1:02 pm
by RyanMco
any HELP please? thanks

Re: Stabilizer explanation

Posted: Mon Jan 20, 2020 9:48 am
by kimberly
The stabilizer part is the hart and soul of the crazyflie, as explained before to you in viewtopic.php?f=6&t=3851&hilit=stabilizer#p17732. Stabilizer.c contains two important parts which it can not live without:
  • State estimation: Without this, the Crazyflie will not be able to estimate it's roll pitch and yaw, or any of the positioning. Without an state estimation, the CF can not control those variables. It is like dropping in a rain forest without an map or GPS. We have 2 different state estimator, where each of them is useful in different situations.
  • Controller: The controller controls the variables like the state estimate. Without the controller, the crazyflie can not stabilize itself in flight. There are 3 different types of controllers, useful for different applications
You should not remove or replace stabilizer.c. If you really need to change it due to an assignment or project, you will need to look how the different state estimators (Kalman/complementary) and controllers (PID/Mellinger/INDI) are implemented, and add a new one exactly the same way as the others have been.