What you are describing is a bug. I have been able to fly while turning the yaw without (big) problems (it tends to work much better with the non-linear controller than with the PID controller).pedro.lucas wrote:Hi Arnaud,
In the code that I’m using based on the autonomousSequence,py, there is a parameter called Kalman.resetEstimation which allows to reset the used data structures when it take-off as I can understand from the firmware (In fact I’ve been checking the firmware). As I described before I moved the coordinate system to get always the front of the CF facing to the X axis from mocap, however, I thought that there would be no problem if always (even while flying) this solution were applied, but it doesn't work at all. What I can realize is: if the CF change the front direction while is flying, the CF fails and turns over. I supposed that, considering that EKF works if always the front is facing X, when the yaw change because of a movement, it cannot restore the init yaw(which faces X) in which it starts, it is true ?, If that is the case then I think the controller should keep the init yaw (the setpoint yaw would be zero), and when the setpoint yaw is different from zero, the CF should rotate in yaw and update what is needed to be adjusted to the new orientation (all of this makes sense ?), but maybe it is something not easy. I will expose this explanation on github and I will mention Marcus, any thought about this issue would be great.
what we are doing is to always power-on the copter facing X, when that is done we can take-off and set a setpoint with a different yaw without problems. So if that is not working for you we have a bug somewhere.
What configuration are you running? (content of the config.mk file).