What does the controller.cmd_thrust variable actually mean? #1471
Replies: 1 comment 2 replies
-
Hi! Is it just roll, not pitch behaving like this? There's more information about the stabilizer here if you haven't had a chance to look at it yet. Are you using the default PID controller? I quickly looked though the code and from what I understand this is the commanded thrust, but it will be capped to the value you're seeing. The links below are for the PID: Here's where it's being used to do the calculation for the motor output: https://github.com/bitcraze/crazyflie-firmware/blob/9ee56072ec1a769ab6dac3e1a1a781ef105853ba/src/modules/src/power_distribution_quadrotor.c#L92 And here's where it's being capped: https://github.com/bitcraze/crazyflie-firmware/blob/9ee56072ec1a769ab6dac3e1a1a781ef105853ba/src/modules/src/power_distribution_quadrotor.c#L150 |
Beta Was this translation helpful? Give feedback.
-
I am running experiments with the Crazyflie 2.0 and am consistently running into an issue where once resistance is met the quadcopter automatically flips over in the roll direction.
I have been logging controller.cmd_thrust and some other variables to check if it is a saturation issue and see that the value automatically hits its limit of 65535 a few seconds before loosing control but I need to nail down exactly where I can find how this variable is used and computed in the code.
If the number is maxed out does that mean that one or more motors are at full throttle? I'm newly exploring quadcopter controller so any help or more detail on this variable would be greatly appreciated!
Here is a quick screen shot of the crazyflie maxing out this value for reference.
Beta Was this translation helpful? Give feedback.
All reactions