Yaw angle drifts before takeoff

Firmware/software/electronics/mechanics
Post Reply
msorocky
Beginner
Posts: 7
Joined: Mon Jan 08, 2018 2:46 pm

Yaw angle drifts before takeoff

Post by msorocky »

Using logging, I can see the yaw angle provided through the stabilizer log data - before the Crazyflie takes off, the yaw angle is not constant after it is moved. After the Crazyflie is rotated slightly, the reported yaw angle continuously increases (or decreases). Once the drone takes off, the angle is consistent with the drone's behaviour and only changes when the drone rotates. What could be causing this?

Essentially what I would like to do is measure the drift of the yaw angle over time, and would like to test this with the propellers not moving, but from using the motion_commander.py interface, the Crazyflie takes off even when I don't use the 'with' keyword, and take off with the call: "mc.take_off(height=0, velocity=0)".
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Yaw angle drifts before takeoff

Post by arnaud »

How much drift are you observing?

The YAW estimate will always drift since there is no way to measure the absolute YAW, but the drift should be the same when not flying and flying.
msorocky
Beginner
Posts: 7
Joined: Mon Jan 08, 2018 2:46 pm

Re: Yaw angle drifts before takeoff

Post by msorocky »

We found that the yaw angle would continuously increase - however, when we raised the Crazyflie several inches above the ground, the estimates were consistent with the movement. I assume this is due to the flow deck being able to provide more relevant information (initially there was only a piece of paper underneath the Crazyflie, I later added two objects underneath) to the Kalman filter, resulting in a better estimate.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Yaw angle drifts before takeoff

Post by arnaud »

I did some more test and I think I know what you are observing: the Kalman filter will slowly move the YAW towards 0 when you are landed. I guess this has been done assuming that without any YAW information, the Crazyflie is facing X.

so, if you start and stay facing X you will be good in absolute YAW :-). And it should not cause any problem for relative YAW and velocity control relative to the Crazyflie (the mode we normally use).

If that behavior is a problem for your use-case I think there is a way to disable this behavior in the EKF.
Post Reply