Yaw reset when landing

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
aidos
Beginner
Posts: 4
Joined: Thu Nov 07, 2019 3:48 pm

Yaw reset when landing

Post by aidos »

Hello,

I have noticed that, after rotating while flying when using the high level commander to control the crazyflie, the function land will make it rotate while landing to the starting yaw (the recommended x axis direction for LPS).

How could I disable this functionality?

Regards,
Inês
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Yaw reset when landing

Post by arnaud »

Looking at the code this is indeed the behavior of takeoff and landing, they both set a yaw of 0 at the end of the trajectory: https://github.com/bitcraze/crazyflie-f ... .c#L48-L50

One fix, if you feel comfortable modifying the code you can change the line "takeoff_pos, 0, vzero(), 0, vzero());" into "takeoff_pos, yaw, vzero(), 0, vzero());" which will keep the current yaw both when taking-off and landing. If you do so, please update on the behavior since this is something we could improve in the firmware: letting the choice between setting the yaw to 0, setting the yaw to a wanted value or not changing the yaw at all when taking off and landing.

If you do not want to change the firmware you could send a goto command and then a stop command instead of calling land, this should emulate a landing without yaw change.
Post Reply