M2 overdrive/M4 underdrive problem

Post here to get support
syadasti
Beginner
Posts: 8
Joined: Thu Jul 28, 2016 7:42 am

M2 overdrive/M4 underdrive problem

Post by syadasti »

Got my CrazyFlie 2.0 a few days ago, and so far all I can manage to make it do is take a short hop and flip over in the direction of M4.

As seen in the screenshot, it appears to be overdriving motor M2 and underdriving M4. This behavior occurs whether I pin the copter to a table, or hold it in my hand at various angles. I've tried shifting the battery around, to no effect.

firmware: cf2_nrf-2016.02.bin
cfclient: cloned from Github a few days ago
crazyflie.png
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: M2 overdrive/M4 underdrive problem

Post by arnaud »

Hi,

If you let the Crazyflie still on the table does the "actual" yaw moves a lot or does it stays pretty stable?
syadasti
Beginner
Posts: 8
Joined: Thu Jul 28, 2016 7:42 am

Re: M2 overdrive/M4 underdrive problem

Post by syadasti »

arnaud wrote:Hi,

If you let the Crazyflie still on the table does the "actual" yaw moves a lot or does it stays pretty stable?
Interesting.

First startup, on table: Actual Yaw value seems to decrease continuously at a constant rate of .2-.3 degrees per second (significant)

Second startup, on sofa cushion: Actual Yaw increases continuously by about 0.03 degrees per second (small but real)

Third startup, on a different table: Actual Yaw decreases continuously by about .5 degrees per minute (small but real)

By contrast, the pitch and roll numbers are very stable, sometimes not changing at all, sometimes varying by ~0.02 degrees around a median value.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: M2 overdrive/M4 underdrive problem

Post by arnaud »

Hi, This is expected and normal: the gyroscopes will drift but pitch and roll can also be measured by the accelerometer that is used to cancel the gyro drift. YAW being around the gravity acceleration it cannot be measured that way and we have no way to cancel the drift. We had a bug in the gyro bias estimation that creates the kind of behavior you are observing that sometime the drift is much higher than others. This has been fixed in git.

Anyway this cannot explain the rapid rotation you are experiencing since these drift are pretty small.

Would it help if you set the yaw rate to 0 in the client (to make sure there is nothing wrong with the control)? And have you tried to update your Crazyflie to a newer firmware version?
syadasti
Beginner
Posts: 8
Joined: Thu Jul 28, 2016 7:42 am

Re: M2 overdrive/M4 underdrive problem

Post by syadasti »

arnaud wrote:Hi, This is expected and normal: the gyroscopes will drift but pitch and roll can also be measured by the accelerometer that is used to cancel the gyro drift. YAW being around the gravity acceleration it cannot be measured that way and we have no way to cancel the drift. We had a bug in the gyro bias estimation that creates the kind of behavior you are observing that sometime the drift is much higher than others. This has been fixed in git.
That makes sense.
Anyway this cannot explain the rapid rotation you are experiencing since these drift are pretty small.

Would it help if you set the yaw rate to 0 in the client (to make sure there is nothing wrong with the control)? And have you tried to update your Crazyflie to a newer firmware version?
I set "Max Yaw angle/rate" to 0 in the Advanced Flight Control section. No discernable change in behavior.

As for a firmware update, sure, but where to get it? I'm running 2016.02, from February 17, which appears to be the latest at https://github.com/bitcraze/crazyflie-release/releases
syadasti
Beginner
Posts: 8
Joined: Thu Jul 28, 2016 7:42 am

Re: M2 overdrive/M4 underdrive problem

Post by syadasti »

I'm also noticing that, while holding the drone in my hand I can push the thrust to full and then (using the same left joystick on my xbox 360 controller) find certain points where, depending on the drone's attitude, M4 completely spins down.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: M2 overdrive/M4 underdrive problem

Post by arnaud »

If you hold the copter in your hand this is also expected, the controller will try to compensate more and more and the extreme is to stop one motor.

Have you double checked the propellers? If it flips over it might be that one propeller is not of the right kind.

Yes the latest binary is from February, the git repos has gone forward since then but we havent built a new release yet (we are cleaning up things for the summer so the end of the summer will be a good time to release I guess).
syadasti
Beginner
Posts: 8
Joined: Thu Jul 28, 2016 7:42 am

Re: M2 overdrive/M4 underdrive problem

Post by syadasti »

arnaud wrote:
Have you double checked the propellers? If it flips over it might be that one propeller is not of the right kind.

Yes the latest binary is from February, the git repos has gone forward since then but we havent built a new release yet (we are cleaning up things for the summer so the end of the summer will be a good time to release I guess).
I have checked the propellers. Actually, before I posted this, I took another look, found that I had AA-- instead of A-A- and fixed it. No effective change there, motor speeds not effected.

I've also tried swapping motors, M4 to M1 and M1 to M4. Again no change, it's still underdriven.

It's starting to sound like this is not a known issue. I can certainly flash an up-to-date or debug version firmware if you can direct me to build instructions. I guess I can also capture log traces for you, if I know what I need to enable and send. I could also do a voice/video call with you, Friday, including remote access to my machine (linux, via ssh) if that would be of use.
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: M2 overdrive/M4 underdrive problem

Post by kristoffer »

The best tutorial for getting started with the code is https://www.bitcraze.io/getting-started ... velopment/
In that flow will you will fetch the latest code, compile it and flash the binaries to the Crazyflie
syadasti
Beginner
Posts: 8
Joined: Thu Jul 28, 2016 7:42 am

Re: M2 overdrive/M4 underdrive problem

Post by syadasti »

bumping to see if Arnaud is back from holiday :)
Post Reply