Hexa suddenly climbs *fast* in position hold mode

A problem appeared (that was never there before) on my hexa. Now, when in position hold and sticks centered, it periodically goes up very fast for 5-10 m, then descends. This does not happen in manual mode.

The copter flew normally in a number of occasions and no changes were done in hardware/software.

I have a flight log here.


A few observations:

  • position hold was engaged approx at -10m (the copter stays around that value, except for the jumps)
  • the mentioned effect appears three times from minute 15 to 16.
  • I feel that the Z position estimate is not correct, as visually the copter was climbing much more than the 1-2 meters reported in the logs.
  • Also, from 15:25 to 15:35 the estimated velocity is about -0.5 m/s, but the position estimate does not change in that time frame (always approx -9.5m)

Does anybody have any clue of what is happening?

Your log seems to be lacking the estimator status topic and many others. We cannot analyze it this way. Is this a custom firmware?

Yeah, you’re right. I had disabled most of the logs as I have several dropouts even if I am using the suggested SD.

Today I did another test. Here are the logs with the default set of topics. Please tell me if I should manually include more.


The problem is clearly visible at minute ~4:20. The reference elevation is constant, yet the copter goes up, a lot, and fast. The actuator outputs are suddenly growing at minute 4:17.

I did other tests before this one and my sensation is that this happens in combination with yaw/roll/pitch setpoints (e.g., driving at a certain speed for a while). The last day there was high wind, and this was happening periodically even in position hold. Whereas today (almost no wind), the thing happened only after several seconds at ~4/5 m/s speed (in the beginning, when I fly at 2 m/s everything seems fine).

It is clear that the copter knows it is going up, but it does not command the proper action to maintain elevation. I am using mostly default tuning parameters and the copter looks nice and stable, except for this.

Another interesting thing is the following. After min 3:40 the Z setpoint does not change at all, while the throttle on my radio does. It is not missing data, as I have checked the timestamps. Here is a plot of the two:

My firmware is a custom variation of 1.6.5 stable, we have just some little modifications which don’t involve in any sense estimation or control.

As a side, I have the usual 3dr Ublox receiver + compass, plus the px4fmu_v2 board. Is it normal that barometer and GPS elevation differ significantly? Shouldn’t the offset be compensated based on GPS at init?