Page 1 of 1
CAREFREE mode and flying with non zero yaw rate
Posted: Sat Sep 10, 2016 4:00 am
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
Re: CAREFREE mode and yaw damping
Posted: Thu Sep 15, 2016 12:10 am
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?
Re: CAREFREE mode and yaw damping
Posted: Mon Sep 19, 2016 6:59 am
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 vikacopter
http://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?