Hi everyone, I am having a problem with my quadcopter rapidly gaining altitude when flying in auto mode. I am flying using the mission below.
My quad takes off and flies to the first waypoint as expected, however once it reaches there and turns around to face the second waypoint, it increases altitude rapidly, despite it not being programmed to change altitude. This has happened multiple times, and I have to switch back to manual mode when it gets up to around 50 m because it is clearly not following the mission at that point. I have reviewed the log from these flights, and the barometer readings are accurate, so the flight controller should realize that it’s altitude is too high.
I have tested my mission using the Mission Planner simulator, with all the same parameters as my quad. In the simulation it completes the mission exactly as I would want it to, taking off and flying at the correct altitude for the whole mission. I have had this same problem both with the APM 2.8 (ArduCopter v3.2.1) and Pixhawk 4 (ArduCopter v3.6.4).
I was wondering if anyone has had similar problems before, or has any suggestions for what could be causing this?
How is it flying about in Alt hold and loiter? Usually gaining altitude is due to vibrations or exposed barometer. Check the logs for vibrations using MP auto analysis.
Thanks for the advice. It flies pretty much as expected in Alt hold and loiter. On my last flight when I switched from stabilize into loiter it did gain altitude briefly, but then it came back down to the initial altitude. Other than that I haven’t noticed anything wrong with those two flight modes.
Here is the auto analysis
It does say there was an IMU mismatch, so I guess the vibrations are a problem like you suspected. The GPS glitches it mentioned were both brief and from looking at the log appear to have occurred after the altitude gain I mentioned.
Yeah, even if its not the root cause defiantly needs fixing. It got 4.78 when 1.5 is a fail.
When you do a flight mode change the buzzer makes a sound and this causes even more vibrations, resulting in the slight altitude jump.
Make sure the buzzer is mounted away from the Pixhawk and maybe on a bit of its own double sided foam tape or similar.
You’ll still have to sort out other vibrations too.
Also you can disable the buzzer in parameters but then you never get to hear it.
Can you post a log please?
This link should let you download the log from my last flight, as it is too large to upload directly.
@xfacta I suppose this could cause the slight jump when I switched into loiter, however the altitude gain during the auto mission occurs after it has already flown to the first waypoint, so I doubt that buzzing is what causes it, but I’ll try mounting them further away anyways.
I purchased a small anti-vibration mount I am going to try out for the Pixhawk, I’ll update this thread with how it goes. If the vibration is the root cause of the altitude gain, I am curious why that would happen only once it reaches the first waypoint. My only guess is that when the autopilot uses the yaw to turn the quad, that causes added vibrations? I typically don’t use yaw that often when flying manually.
Sorry for the late reply, I was unable to fly for a few weeks. After testing the anti-vibration mount, the altitude gain problem appears to be fixed! Thanks for your help
@MichaelD, Great that it’s resolved. Paul Riseborough and I are actively working to try and add additional safety checks to catch these situations and change the EKF’s parameters so that it’s more resistant to high vibrations.
That sounds great! Would you be able to share what parameters might be useful here?