I really have no idea how to analyse the log files.

This afternoon I was flying 2.5 from the git repository.

It does seem to fly better than 2.4.1.

Then I tried loiter and things did not go well.

I am only fairly new at this so was flying stabilize simple and switched to loiter.

The 3DR quad then flew backwards then forwards then accelerated and finally flew off crashing into the ground.

I have attached the log and am hoping that someone could take a look and try and determine what went wrong with my loiter.

Either that or tell me that I should not be flying that code just yet.

Thanks

Views: 226

Attachments:

Reply to This

Replies to This Discussion

I am not an expert by any imagination in reading logs but have just learnt a little while trying to decipher some of my own.

It's hard to say with your log as I can't see if and what went wrong although the Nav lat & long seem to build up tremendously just before the crash.

At about point 975 it appears that you switched to loiter as there are no further stick inputs from there on in, the quad then starts a slow swing back and forth as described which seems to get worse and worse until the crash, I've never let it get that far and switch out of loiter when things start to go pear-shaped like that.

What is your Loiter_P and _I set to?

Hi Graham

Loiter_P is 0.700

Loiter_I is 0

Loiter_IMAX is 30.0

Thanks for taking a look.

This is the first time I have tried loiter and thought things were definitely going pear shaped but was not sure what would happen if I switched out seeing so much speed had built up.

Lloyd

Looks like Jason updated the GIT loiter gains again and halved the Loiter P to .35.  Since, it's not released, the devs are still working the baseline config.  It's still pretty alpha

Here's why:

There are two layers for Loiter: A position controller(Loiter_P) and a rate controller(Loiter_Rate_P). The position error feeds into the rate controller to get the final output. 

Loiter_P value commands a rate based on position error. When Loiter_P is higher and Loiter_Rate_P is lower you get a less noisy signal to the roll and pitch output.You could balance them for a more position based error or more rate based error. This works really well for Altitude hold because the Iterm is broken out in a special way.

Loiter however does not break out the Iterm in the same way as Alt hold for other reasons. What happens is the I term in the rate loop, which is downstream of the position loop, essentially gets scaled with Loiter_P. This is not a bug, but just how tuning Loiter works. More rate error means more compensation. It's also not something I had noticed before, but the Loiter_Rate_I was fairly high to begin with and the .7 it made it double. This leads to massive overshoot that can build over time.

In the wiki we recommend not fussing or at least raising Loiter_P. I should have stuck to my own advice! 

Jason

Hi jason not sure where to raise this.

I was looking through the git diffs trying to track down the bug that caused my problem.

I found this fix

http://code.google.com/p/ardupilot-mega/source/detail?r=f55afc0bcac...

if ( last_longitude == 0 && last_latitude == 0 ) {
last_longitude = g_gps->longitude;
last_latitude = g_gps->latitude;
}

If these values are truly uninitialized then you cannot guarantee they are both zero.

If they are somewhere set to 0 then the code is fine.

Not sure how I can get the email address of the committer to question him.

Thanks

Lloyd

Lloyd

Thanks for the answers.

Guess I should have been more patient.

Not too much damage just a couple of broken props.

How many people are using prop savers?

I would have been through a lot of props by now without them.

Lloyd

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service