Hi Droners. I've been having a problem with RTL using ArduCopter 2.6 for a while. It's intermittent, but annoying and a bit worrisome. When I take off I always test RTL if I'm going to fly FPV. That way it can come home if I have trouble. The problem is, for the last few versions of AC2, RTL occasionally flies away, instead of flying home. Not only away, but away at crazy high speed.

Take a look at the attached video for an example. Note that when switched into RTL mode (mode is shown lower right), the 'copter starts to move (away from me, mind you) and gradually pitches more and more until I abort the RTL and go back to STABILIZE mode. Also note the distance to home, as indicated in the OSD is 24m, which is about right.

Looking at the log file (also attached), when switching to RTL mode, the lat_error/long_error goes from 0/0 to 521/1000 (and grows throughout the RTL event). Is that in metres? Lat/Long decimal places?

Has this been observed by anyone else? Is it confirmed fixed in a particular version? Are there any other tests I should perform to try to catch this silly bug?

Specs:
* APM2 hardware
* External MediaTek GPS
* Spectrum RCRx
* AC2.6 firmware
* XAircraft Quad
* GoPro and VTx streams recorded

Keep dronin',
FM

p.s. I know what many of you will think: "Just upgrade to 2.7.3 and this will go away". Maybe, but I can't install 2.7+ on my current batch of APM2. I can install it on APM2.5, but not APM2. This will be a subject of a future analysis and bug report forum post.

Views: 3307

Attachments:

Reply to This

Replies to This Discussion

I would not suspect a hardware *failure* - as the magnetometer test works.

But I do suspect some kind of APM bug that somehow does not wait for it to init fully - and some take maybe a little longer to get ready ?

Anyway - I reproduced the problem with APM on desk with only USB power connected. - reflashed several times, ane erased config/logs - the APM that is faulty, will always "think" it's booted in North direction..

I tried RMA at some point, but got the "it's open source" answer.

You might be onto something.  In AP_Compass_HMC5843.cpp I see the following code:

AP_Compass_HMC5843::init()
{

...
while ( success == 0 && numAttempts < 20 && good_count < 5)
{
...
}

Maybe it needs more numAttempts or a larger good_count.  Another thing to play around with. 

I've strangely never had the problem when flying similar missions in an East-West direction.

Is the magnetometer susceptible to the same turn errors as a pilot's whiskey compass?  This is the lead/lag when turning toward the east or west from a north or southerly flight.  There is no lead/lag error when flying east or west.

http://williams.best.vwh.net/compass/node4.html

Hi droners.  After our discussion about the compass possibly being the cause of my woes I did some more test flights.  I found that the drone that I've been doing most of my testing on is the one APM I have that has a seemingly faulty compass.  My other drones don't have this problem.  However, if I boot up with the drone facing north, it _mostly_ works.  The compass, even with learning turned on, tends to drift out during the flight, however, so even it RTL works at the beginning, it may not function toward the end of the flight.


This APM has already been RMA'd to the factory (I couldn't get the radio calibration to work) but they couldn't reproduce the problem in the factory and it worked after it came back.  Hmmm.  Anyhow, it's a known-flakey piece of hardware.  It occurs to me that I could put this APM in my plane and use the plane APM on a 'copter as planes don't need the compass. 


In the meantime, I've found a workaround involving adding a small piece of apparatus to my drone (see attachment).

Attachments:

Hi Fete,

I was wondering whether the problem is related to hardware failure (mine has sure taken a couple of big knocks) or just interference. My APM2 also sits in a cramped space under the Ublox GPS such as I see in your photo.

Two questions:
Did your APM also take some knocks? and
Is there an option to mount the compass remotely on the APM2?

You should'nt put hardware with a know problem in any autonomous platform that flies. A rover would be better.

I've knocked my hex around quite a bit.  Bent arms, broken motors, a couple of dozen props.  I was going to rename it "Lawn Dart" for a while.  Slowly but surely, I leaned to fly.  Mostly to not overcontrol the hex.

But yesterday's flight was one of the best yet.  (Arducopter 2.8.1, Mission Planner 1.2.17)

Here's my stack:

Haha... I tried you fix and... interesting, it didn't work! But when I tried starting the copter facing south it did (2 out of 2 flights). So for me is the opposite but yes, it looks related to direction at startup

Hi Fête,

Sorry for reviving an old thread, but I can't find anything newer relating to this problem!

I've been having the same problems as you have described. I'm running 2.9.1 on a quad.

I've looked through my logs, and I can see where it goes crazy, but I can't tell whether the compass it working normally or not. What parameters did you look at to verify correct/faulty operation of the compass? When the quad flies away, the compass seems to be just be reading normally.

Anyhow, my symptoms match identically to yours. Seems to be most likely to fly away in RTL mode, just as it's arriving at the home waypoint. Sometimes happens when switching in to Loiter, but less frequently...

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service