QGC LOCAL_POSITION_NED drifting
-
Hello, I am noticing two curious things about the reported local_position_ned in qgroundcontrol's mavlink inspector when the drone has just been powered and is stationary.
- The x and y values sometimes start out as 0, 0 and don't update.
- When the x and y values do update, they will begin drifting a considerable amount. I have seen drifts of +/- 3 meters.
Video showing above behavior: https://drive.google.com/file/d/15egtrzoSuTfRdfDQPN6VVn76V3ON6shY/view?usp=sharing
Does anyone have an explanation for the drift? Is this normal? Will it affect flight performance? I do notice the reported attitude of the drone is stable.
Additional info:
voxl-vision-px4 config
voxl-verison
-
@Matthew-Howlett You might want to reference this post
-
@Adrian-Hidalgo Thanks for the quick reply!
So, that explains why x and y start at 0. My ekf2_aid_mask is set to 1. I don't intend to fly with computer vision enabled.
However, x and y do sometimes start updating and begin drifting. Any idea why that is? Can I just ignore that? -
@Matthew-Howlett I've seen it drift around, but usually it's not as wide of a swing, unless it's lagging behind or the sensor calibrations need to be redone. If you're not using computer vision, you may want to turn off vio if you're not using it just in case. There could be a mismatch since the Voxl has vio turned on but QGC has set for what looks like outdoor.
Go back into voxl-vision-px4 and set "en_vio" to false
Then restart voxl-vision-px4
Could you send a picture/quick video of the local_position_ned in QGC? Could take a look -
updated voxl-vision-px4.conf:
Here is a link to a video showing the local_position_ned in QGC. (x,y) starts at (0,0), begins updating around 30 seconds into the video, and then drifts the rest of the video:
https://drive.google.com/file/d/1OSAgLHbxG5hQQcpUYgtwHRjWdo-vgqHW/view?usp=sharingI understand the GPS position may drift, especially if indoors (I was indoors for the above screen recording). But looking at the PX4-autopilot mavlink code, the local_position_ned should not rely on the GPS. It is calculated from the fused computer vision and accelerometers, correct?
-
@Matthew-Howlett thanks for posting that info. You are correct about Local_position_ned being calculated from computer-vision and imu's.
When you stated that you're not using computer vision, what method are you attempting to fly? The drift will also affect manual flight. Have you attempted resetting qvio?
From the first video, it seems the battery status was at zero. I'm guessing parameters have been loaded already.
To confirm, is this on an M500? -
@Adrian-Hidalgo Correct, this is on an m500 drone. I intend to fly to GPS waypoints in mission mode (I have done this a few times successfully before noticing the local_position_ned was drifting). I didn't see the vehicle drift while in flight but wanted to double-check before flying again. I am not sure when the local_position_ned began drifting. I have tried resetting qvio - seeing that doing so had resolved local_position_ned issues for someone on another forum. I have the drone on my desk and powered from a 12V 3A wall power supply - I believe that is why the battery status reports zero (when I use a lipo, the battery status looks correct). & yes the vehicle parameters have been loaded.