Plane goes berserk at RTL.

Hello, I got some really strange behaviour a couple of days ago and I 'm trying to figure out why. Here is the setup.

Skywalker with PX4, running Arduplane 2.74b, connected to a laptop running Mission Planner. On my remote, I had two modes I could switch to, Manual and RTL.

Maiden flight of the PX4 and the Skywalker hadn't flown for many months so I wasn't sure if the elevator was properyl trimmed. Launched in Manual and immediately realised the elevator needed some serious trimming down but nothing too terrible. Got some height and decided to try RTL (this was standard for my previous flights on APM hardware, switch to RTL, check plane was circling overhead, then walk to the laptop and typically continue via Guided or Auto).

As soon as I switched to RTL, it rolled very aggressively to the left and dived hard.

3691049424?profile=original

In the photo from the onboard cam (mounted on the tail), you can see the ailerons at close to full deflection.

I watched in horror for a second or so, expecting it to come to its senses but it didn't show any signs of recovery. The next pic is just before I took back manual control, notice that the ailerons are still full left and I believe the very straight wing shows a low angle of attack, most likely due to some serious down elevator.

3691049565?profile=original

I immediately switched to Manual and pulled it out so hard the wings did things no wings should be asked to do.

3691049578?profile=original

The foam they use in those things is an amazing material isn't it?

Anyway, I didn't dare to leave Manual after that so I brought it back in. Now, I 'm trying to figure out WTF happened but can't really figure it out. I can't get the dataflash logs out because I 'm running MP through a Windows 7 virtual machine on an ancient laptop running Linux (fingers crossed for when MP will merge with QGC) and by the time all the machines have done their song and dance and Windows sees the COM port, the PX4 has booted into its normal mode. However, I can get the RLOG which I have included. What I believe is the juicy bit is in the next photo.

3691049374?profile=original

The dip in the throttle (cyan) is where the mode switches to RTL (I had it full throttle as I was on the take off climb when I switched). The next bit of full throttle shows where I got manual control back.

Pitch is brick red. It drops pretty dramatically, soon after the mode changes. This is backed up by Servo 2 (magenta) which shows a pretty hard elevator deflection (I guess this is down).

Roll is dark green. It wanders around and then takes a nosedive as soon as the mode switches. Servo 1 (blue) is a bit all over the place before but it firmyl flatlines at the bottom during the Terror.

Now, the intriguing bit. Nav pitch and nav roll (red and green, I assume these are the targets the controller tries to track) are doing perfectly reasonable things. They certainly don't do anything remotely like what the real pitch and roll did. Nav pitch is slightly positive (understandably, this happened around 50m and the RTL target was 100m). What the hell was the controller trying to do diving into the ground, bounce back to 100m? The Skywalker is quite elastic but I don't think it would make it.

Anyone got any ideas?

2013-08-14 16-56-39_PX4_maiden_crazy_RTL.tlog

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Thank you gentlemen for the replies. The PID gains might change the way the vehicle responds but not the direction (granted, an enormous I term might take a long time to "deflate" but what I got there was too ridiculously enormous to be a simple gain error unless the gains were outrageously wrong).

    The direction was indeed reversed in both aileron and elevator. I know, I know, I should have checked in STABILIZE first, you are absolutely right and it did cost me a few gray hairs. I had done this so many times, I got complacent. This time, I got a virgin PX4 board out of the box (first time I got to play with a PX4), flashed it, uploaded the params for Skywalker, calibrated compass and radio, set the modes and went straight to fly. Ooops, idiot human error strikes again.

    Now my question is this. I have changed ailerons and elevator to deflect in the correct way in STABILIZE. How do I know if the rudder is also correct? Right now, rolling the plane to the left produces left aileron down (right up) and rudder right. This is the correct rudder deflection for a correction towards the right, right?

  • Developer

    Hi Andreas,

    It looks like your aileron is reversed (ie. RC1_REV is -1).

    Looking at the correlation between X gyro and aileron, I think that positive aileron is causing the plane to rotate to the right (ie. positive roll). That would imply you should have REV1_REV set to 1. As you have it set to -1 the PX4 will be correcting roll in the wrong direction.

    3692802962?profile=original

    Your elevator servo also seems to be reversed, as shown by the ygyro:

    3692803038?profile=original

    You clearly have it right in your transmitter though, as manual flight is fine.

    Cheers, Tridge

  • 100KM
    I'm very happy that you could save your plane! I also have a cam in the back watching the wings. Agreed with Andrew, is stab mode OK?
  • Have you checked you've got the correct PID gains?  How does it operate in stablise mode?  I would check that it's fully functional in stablise before moving onto any other modes.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…