Hi developers,
I am reading source code of crazeflie 2.0, and I don't understand some code. For example, why we judge the macro "RATE_DO_EXECUTE()" in function stateController() ?
Thanks!
A question about macro "RATE_DO_EXECUTE"
-
- Beginner
- Posts: 16
- Joined: Tue Oct 17, 2017 2:05 am
Re: A question about macro "RATE_DO_EXECUTE"
The stabilizer task runs at 1kHz but only the rate stabilization needs to run that fast. The attitude stabilization can run slower and the velocity stabilization even slower then that. So the RATE_DO_EXECUTE is just a divider of the update rate.
-
- Beginner
- Posts: 16
- Joined: Tue Oct 17, 2017 2:05 am
Re: A question about macro "RATE_DO_EXECUTE"
In your answer, does ' the rate stabilization' mean body angular velocity stabilization? Thank you.
Re: A question about macro "RATE_DO_EXECUTE"
Yes, the rate stabilization is the body angle velocity stabilization.