Had a near miss on the workbench the other day when the Mode was not properly recognized on my APM 2.5. When the APM was started it was in RTL mode despite the fact the transmitter switches corresponded to MANUAL mode and the  PWM value being read was 1823ms (MANUAL MODE). After about 20 seconds the APM went to full throttle on the workbench! Fortunately no damage done to either myself or to anything on the table.

I have the following setup for each of the modes:

Mode 1 PWM      0-1230        11    RTL
Mode 2 PWM 1231-1360         5    FBW-A
Mode 3 PWM 1361-1490       12    LOITER
Mode 4 PWM 1491-1620         2   STABILIZE
Mode 5 PWM 1621-1749         0   MANUAL
Mode 6 PWM 1750+               0   MANUAL

The attached tlog (2012-12-15 12-52-44.tlog) shows the input on CH8 (my mode switch) to clearly be above 1800ms which should respond to the non-adjustable MANUAL mode, instead it has been interpreted as RTL mode as can be seen in the MP. After 20 seconds you can see CH3 go to 100% throttle.

Before I submit an 'issue' for this I wanted to see if anyone else has experienced any unexplained misinterpretations of the mode switch inputs. I'm stumped as to the cause as this appears to be a clear case where the PWM value is well above the 1750ms threshold to be in MANUAL mode (not user changeable) throughout the entire file yet the MP shows that the APM believes it is in RTL mode and after 20 seconds it switches to full throttle.

I am using an APM 2.5 running 2.68, I have a uBlox LEA-6, Airspeed sensor, Attopilot voltage and current sensor, 3DR 900MHz telemetry and a MinimOSD v1.1 running MinimOSD Extra r458. Power is supplied to the APM via a Castle Creations 10 Amp BEC and the Minim OSD is powered in a two stage format with the digital side powered by the APM and the Analog side powered by the vTx and a separate battery.

If anyone has any ideas I'd be happy to check anything out. It's been to windy or cold here to do any actual flight tests yet, and until I find an explanation to this behavior I'm grounded as I don't trust it's behavior. Manual must always mean Manual.

Regards,

Nathaniel ~KD2DEY

Tags: 2.5, 2.68, APM, ArduPlane, Mode, Switch, failsafe

Views: 457

Attachments:

Reply to This

Replies to This Discussion

Tridge,

I'm trying to understand what I'm seeing in the graph of the tlog as far as 'HeartBeat' messages goes. I think I have graphed the right items here, but I'm not sure what I should expect to see for the 'HeartBeat' portion of the graph. Is it a frequency count or should I expect to see it oscillate up and down like a heartbeat? If it's a frequency count what is the expected frequency? Lastly what are the 2 different RSSI values and how do they differ? Is there a wiki somewhere on the MavLink protocol with an explanation of the different parameters?

Regards,

Nathaniel ~KD2DEY

Hi Nathaniel,

Heartbeat messages go in both directions. In this case I suspect the plane was not receiving heartbeat messages from the ground station.

The logs show heartbeat messages like this:

2012-12-16 04:52:46.49: HEARTBEAT {type : 1, autopilot : 3, base_mode : 1, custom_mode : 16, system_status : 2, mavlink_version : 3}
and also like this:

2012-12-16 04:52:52.40: HEARTBEAT {type : 6, autopilot : 3, base_mode : 0, custom_mode : 0, system_status : 0, mavlink_version : 3}

The first one has type==1, which means "fixed wing". That is ArduPlane. The second type has type==6 which means "GCS", so that is Mission Planner.

So the planner was configured to send heartbeats. The puzzle now is why the APM went into GCS failsafe.

The timing is key. Here is the message where the APM enters GCS failsafe:

2012-12-16 04:52:47.19: STATUSTEXT {severity : 1, text : Failsafe - Long event on, }

That is only 1 second after the start of your log, but it is 24 seconds after your APM booted (we can tell that as many of the messages have a "time since boot in microseconds" field).

The logs also show that MP doesn't send it's first HEARTBEAT until 5 seconds later. It looks like it doesn't send heartbeat messages while it is downloading the parameters from the plane.

I'm going to make a small change to the ArduPlane code to reset the timer for GCS failsafe when we finish the system startup. That would prevent what happened to you, and also makes more sense as it is the time since we finished init rather than the time since power on that really matters.

There is another puzzle in your log however. The ArduPlane code has a "throttle suppression" mechanism that is supposed to prevent the motor starting while waiting on the ground. Whenever the plane is in an auto mode (including RTL from failsafe) it monitors the height and ground speed (from the GPS) and if the height is below 10 meters and the ground speed is below 5m/s then it won't run the motor.

In your case you happened to get GPS lock soon after startup, and your GPS reported a ground speed at that time of 10m/s, so the throttle suppression was disengaged. I suspect your GPS was under a roof and got a poor ground speed estimate from the initial satellite lock.

Cheers, Tridge

Tridge,

Once again you are spot on with your assumptions! Yes I was indoors when testing so the GPS didn't have a clear LOS. The behavior makes much more sense to me now. Could we use the Airspeed instead of the Ground Speed when ARSPD_ENABLE and ARSPD_USE are set to one? Would that be more reliable?

Is there a wiki section somewhere that goes into the Mavlink parameters in detail? I'd like to become better at reading the logs and understanding what some of the more cryptic parameters abbreviations mean.

Thanks again for your help. I hope you had a happy holiday down under.

Regards,

Nathaniel ~KD2DEY

hi there,

im having a similar problem , when ever i turn off my transmitter my motors go full speed after bout 10 seconds which is bout the time of fail safe.... and if i leave that off and turn everything else on ...motors go wild again. im running sabertooth to power the apm 2.5 unit. which powers the input and output separately . ive checkd sabertooth dip switches, and now im wondering if its something to do with the apm 2.5 unit itself holding values when it loses signal.

See http://code.google.com/p/arducopter/wiki/AC2_Failsafe
See http://code.google.com/p/ardupilot-mega/wiki/APM2xFailsafe

ArduPlane and Arducopter have different fail safe logic, and who knows what ArduRover does, well probably Thomas knows ;-). I would recommended posting in the ArduRover forum a new topic asking how fail safe works in ArduRover. That's a better place to discuss that

Also look at the fail safe section in Mission Planner. You can set what the fails are output is for the motors there.

And check this tutorial on analyzing the logs, that will help you understand what the APM decided to do (probably an RTL)
http://code.google.com/p/arducopter/wiki/AC2_Logs

Hope that helps

well i turned failsafe completely off yet it still either sends a signal or sabertooth is holding a signal not sure why everything is fine...

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

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service