Takeoff then rolls without reaching to takeoff altitude

airplane roles before reaching to takeoff altitutde makes very dangerous turn in the beginning then goes to waypoint. it flies well except takeoff

I am using arduplane 3.8.2 on flying wing with pixhawk 2
picture on the link


anyone can help

Log on link below

Where is the dataflash log? I can’t seem to find it

I forgot to paste the link, i modifed.

Yeah Yeah, this problem happened in 3.7.1 too! Pixhawk!

HAve you found the problem?

Not yet! Always trying to!

I am looking at your log. It seems the auto-takeoff began spinning the prop at 97.3 sec, and the altitude begins rising around 98.75 sec. But at that point, comparing ATT.Roll to ATT.DesRoll, it’s clear that the actual roll goes fast to -65[deg] (in about 2 sec!) while the desired roll is still 0.

Looking at RCOU.C1, immediately on takeoff, the ailerons are commanded a negative value (value drops from 1600 to 1400) for about .3 sec, then they are commanded a positive value (rises from 1400 to 1750) for the next 2 sec, which seems to recover the craft’s bad roll.

Unfortunately I don’t know enough to determine why RCOU.C1 drops and rises so aggressively, while ATT.DesRoll remains at 0. Can someone else help from here?

do you think this problem might come from a damaged servo?

That hypothesis is always possible. However, the plane was able to recover and complete the rest of the flight. It would be strange, but possible, for a loose connection or a damaged servo to malfunction for a short time (3-4sec?), then return to working order.

I mea not the wiring problem
maybe some internal damages inside servo gears? might couse tis problem…

this problem occures many times . this time it was so close to ground when it was rolling

Here’s a useful idea: If the servo is the problem, you will encounter the same issue in manual mode. If this is some ArduPlane or configuration problem, the plane will not show any problems in manual mode, only in AUTO or other ArduPilot-assisted modes.

Try putting your plane into manual mode, and wiggling the ailerons repeatedly. If you see unexpected behavior, investigate what is wrong.

I did that, didnt see any problem.

maybe more logs can help to find this problem, alsways airplane rolls to the left before reaching to takeoff altitiude



From the log, I found that plane always rolls after the MSG of holding course( Holding course 16628 at 12m/s(-32.4))! Also dont know whats the meaning of -32.4!

in 22 time frame apparently servos C1,C2 outputs to make a rotation(not just pitch)
is the DesRoll the only thing that effects the servo output C1,C2

as @Firefly mentions it starts after/during “Holding course 16628 …” which is at ~16:22 time
I found the code here which nav_controller->update_heading_hold(steer_state.hold_course_cd); with 166degree

perhaps @tridge or @magicrub have more info about this.
also heading value gets modulo operation in this time frame as in the

About rapid YAW change , I had a similar problem last year with a copter.

I found out the problem was the I2C bus of the Pixhawk family board where the external compass is connected, if I remember well after a while the reading of the heading by the compass diverge from the initial reading and the EKF routine suddenly correct it . With the copter the result was a sudden 90° rotation on yaw axis.

I solved changing the Pixhawk board with a reliable one .

For plane , I suggest to disable the compass and rely only on GPS for heading.

@lucamax so you think its because of compass error? I got this problem with several different plane, same type! I will check the log of yaw and compass.

I got a good log, during takeoff(before ended altitude) the plane rolled and hit a tall building ,crashed badly. But it seems not the compass problem.

Actually the DesRoll changed during takeoff.

Here is the log file:

Sorry I made a mistake! In the flight above the takeoff ended altitude was 50m. So the rotation is OK. I will find another one!

In the case of the copter , the change in compass reading by EKF leaded to a very rapid change, about 90° in the Yaw axis of the copter .
With the plane I do not know if the same event happens, what will do the autopilot.
For this reason I suggest to disable the compass and use only the Gps for plane heading.

In the first log of Tomi what is weird is the big difference in min ATT_Des_Roll value and min ATT_Roll value