Confusion among controller.cmd_roll, controller.roll, stabilizer.roll

Discussions about all things Bitcraze
Post Reply
imranmomtaz
Member
Posts: 36
Joined: Tue Mar 17, 2020 7:01 pm

Confusion among controller.cmd_roll, controller.roll, stabilizer.roll

Post by imranmomtaz »

Hello,
1. what are the difference between following quantities:
controller.cmd_roll, controller.roll, stabilizer.roll

2. What are the relation between controller.cmd_roll, and controller.roll. I can understand that the units of controller.roll, and stabilizer.roll are kind of similar. But, I can clearly understand that the units of controller.cmd_roll, and controller.roll are not same. Is their any relation between these two? And, what are their units?

Thanks.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Confusion among controller.cmd_roll, controller.roll, stabilizer.roll

Post by kimberly »

You can find these log definitions in these files: https://github.com/bitcraze/crazyflie-f ... abilizer.c and https://github.com/bitcraze/crazyflie-f ... ller_pid.c

controller.cmd_roll = Roll command that comes from the attitutde rate controller that is send to the power distribution to the motors
controller.roll = Desired roll state
stabilizer.roll = state estimated roll

Stabilizer.roll and controller.roll should be in degrees. Cmd_roll is unit less (it is more about the ratio between the angles than the actual unit).

There is some recent added documentation about the controller structure right here that you can find under 'functional areas'. https://www.bitcraze.io/documentation/r ... re/master/
imranmomtaz
Member
Posts: 36
Joined: Tue Mar 17, 2020 7:01 pm

Re: Confusion among controller.cmd_roll, controller.roll, stabilizer.roll

Post by imranmomtaz »

Thank you. I understand this now.
Post Reply