Autonomous flight and yaw

Firmware/software/electronics/mechanics
Post Reply
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Autonomous flight and yaw

Post by arnaud »

This is a continuation of the discussion from the opencv thread: viewtopic.php?p=11806#p11778
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 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).

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).
pedro.lucas
Beginner
Posts: 7
Joined: Fri Mar 03, 2017 4:57 pm

Re: Autonomous flight and yaw

Post by pedro.lucas »

Hi Arnaud,

I'm sorry about the time that has passed since you post this thread. I found that the real problem was the frame attached to the CF to track the balls in the mocap system. It influenced weight and balance I think. I removed the frame and attached only the little balls and it works very well, even with the change of yaw values and considering what you have mentioned before. Now, I face other problem which is the next one: I want to get flying several CFs. Now, I can achieve this goal with one radio for maximun 2 CFs,but when I add a third one, they become unstable and fly randomly. It have to do with communication because it happens even if I test 3 CFs and one of them has a setpoint in zero (no thrust or any) and the other two are unstable, and again, with only 2 it works well. As I exposed before in the Open CV thread, I'm using the tools from crazyflie-lib, no ROS or any other, and additionally, I'm working everything on Windows 8.1, I don't know if this is a considerable influence in the radio. I would appreciate if you have any thought regarding this new issue. In the meanwhile I will continue to find if there is a way to make it works well. Depending on my advances I will post other thread for this issue.

Thanks very much.
pedro.lucas
Beginner
Posts: 7
Joined: Fri Mar 03, 2017 4:57 pm

Re: Autonomous flight and yaw

Post by pedro.lucas »

Hi,

For the new issue explained before, I posted this thread viewtopic.php?f=8&t=2370#p12002
Post Reply