CAREFREE mode and flying with non zero yaw rate

Firmware/software/electronics/mechanics
Post Reply
mrmks
Beginner
Posts: 13
Joined: Fri Jun 03, 2016 7:08 pm

CAREFREE mode and flying with non zero yaw rate

Post by mrmks »

I was wondering if anyone could share yaw response tweaks in the crazyflie 2.0 firmware.
In CAREFREE heading mode, disturbances to yaw are rejected, but I would like to keep them. (the rest of CAREFREE mode, just keeping front the same direction every flight is great for me)
Does anyone know which part of the code I should look at?
Thanks,
Miles
Last edited by mrmks on Mon Sep 19, 2016 7:00 am, edited 1 time in total.
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Re: CAREFREE mode and yaw damping

Post by theseankelly »

I just saw a PM in my inbox from Miles on this same subject. Here's my answer, for the rest of the forum to see too :)

I don't think external yaw is compensated for directly. Last I checked the yaw value was being run through a RATE style PID which means it only corrects for instantaneous rate of rotation and not absolute orientation -- if there's an integral coefficient on the yaw PID then you might see *some* correction for external forces.

Essentially, if you push the crazyflie along the yaw axis, it will fight you. But, when you let go, it will remain pointed where you left it (angular rate of zero) as opposed to snapping back to where it was before you pushed it (absolute orientation).

But, I haven't actually poked and prodded at the yaw control, and I'm not 100% sure how the coefficients actually directly affect flight. I read in one article that tuning the YAW pid is what determines whether you gain or lose altitude when rotating, which is interesting to conceptualize.

Devs?
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
mrmks
Beginner
Posts: 13
Joined: Fri Jun 03, 2016 7:08 pm

Re: CAREFREE mode and yaw damping

Post by mrmks »

Thanks @theseankelly!

I'm trying to make a quadrotor that will fly with a constant non-zero yaw rate. Possible reasons to fly with non-zero yaw rate include lower effective disk loading, prop-loss robustness, and maybe even flying with fewer motors, like the vikacopterhttp://diydrones.com/m/blogpost?id=7058 ... t%3A132941.

CAREFREE mode plus pre-setting some angular rate in the ramp python example is one way to get sustained yawing flight, and it works. Thanks to bitcraze devs and others for this suggestion! The newest wrinkle is 'surging' in yaw if I push the yaw angular rate past ~750 degrees / second in the ramp.py setpoint. There's also a 'coordinated spiral dive' that needs fixing.

Where in the cfclient code should I look to change the default hands-off yaw rate value?
Post Reply