Hi Alfred,
Cool to see that someone else is doing the same thing! I'd like to see the difference in how you and I implemented the headfree mode or "yaw lock" as you call it.

Additionally,

Alfredvc wrote:Once the button is pressed, the crazyflie will lock its orientation about its vertical axis (fixes the horizontal orientation and yaw commands are ignored)

Does that mean that the Crazyflie will try to counteract any forces that are causing unintentional yaw drifting? For example, if I press your yaw lock button while the flie is facing the same way that I am, and a bit of wind or air circulation spins the flie slightly, the PC client will read the current yaw and adjust for it to make the flie "lock" onto its yaw? Or does your code simply block the yaw commands when the button is pressed?

Where the crazyflie gets to rotate, and the controller still has full control over yaw, it's just that the pitch and roll input are unaffected by the yaw of the flie. So if I started up the Crazyflie facing the same way as me, then no matter what the yaw of the crazyflie is at any time, if I push forward on pitch, the crazyflie will go forward relative to me(assuming I haven't moved since startup).

Alfred,
Counteracting external forces sounds really cool, maybe you could even implement that, but without the yaw lock. The user would still have control over yaw, but the yaw that your program locks to is constantly set to the target yaw of the user(or should it be the current yaw?) Basically as a yaw stabilizer. You'd have to do a little work converting the controller's target yaw to a yaw relative to the crazyflie in degrees.

Alfredvc wrote:Hei guys, I just recently received my crazyflie so I'm fairly new to the community. I plan to start developing for the crazyflie for fun during the summer but I've decided to get my feet wet.

I really liked the idea of headless mode, so I implemented it similarly to how x-mode is implemented. I also added another controller bind in the controller configuration in order to have a button trigger the headless mode, or yaw lock as I've called it.
Once the button is pressed, the crazyflie will lock its orientation about its vertical axis (fixes the horizontal orientation and yaw commands are ignored) once the assigned button is pressed again it will be unlocked and the pilot is free to yaw the quad as desired.
This has the benefit that you don't have to lock to the startup yaw, but to whichever position you want!
I can post the code tomorrow after I've tested it a little more!

I don't think the yaw-locking is the same mode as otto implemented.
In terms of the headfree mode it doesn't lock the yaw, but simply locks the horizontal movement (tilting). So no matter on how to turn the quadcopter (yaw), tilting forward will always tilt the quadcopter forward compared to the original start orientation.