-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub: Yaw drift issue #18229
Comments
I think this can be reprodcued in SITL by doing the following:
To resolve it a couple of things come to mind:
|
Thank you for the tips!
A while ago I tried increasing EK3_GBIAS_P_NSE with interesting results: it stopped spinning but got oscillatory. If I'm able to replicate this in master, I'll check the gyro offsets and try to play with this parameter again. |
OK. It wouldn't be the noise or the igate parameter that would help. Instead there is some inbuilt limit on how large the gyro biases can get. Maybe it is this line?
This is not quite what I imagined when I heard about it from @priseborough but maybe this is it. |
Interesting, thanks! I'll experiment with that. |
I'm closing this as I haven't been able to reproduce it in 4.1, |
Re-opening. Some people are still seeing this. Upon further investigation, the issue seems to be that the ekf is unable to estimate the earth magnetic fields with no origin set. The current solution I have in mind is to create parameters for default lat/lon in vehicles with no positioning systems. We'll also need to tweak some code in the ekf in order for it to check for origin set instead of happy GPS. This seems to be easier to reproduce in some places than others, probably due to the local magnetic field inclination/declination. |
The way forward for me:
|
Thanks for the tips, @rmackay9. I was able to induce yaw drift in SITL and eliminate it by causing a yaw / mag reset. Here is the trick to causing a yaw / mag reset in sub:
At some point the sub will be 2.5m higher than (I scanned several dozen tlog files for real dives and found 2 dives where this actually happened.) I took a stab at making it easier for the pilot to cause a yaw reset in #26394 -- basically flipping the sign so you have to go down 2.5m, not up. But now I'm thinking sub should ignore I do like @Williangalvani 's idea of using parameters to set the default origin. Right now the |
Very interesting. So another solution may be to change the EK3_MAG_CAL parameter default from 3 (After first climb yaw reset) to perhaps 2 (Never) or 0(When Flying). Rover uses "2", Plane uses "0". Copter uses "3". |
Another note: |
Yes, we could add an or to that condition so that its either a 2D fix or a position estimate. |
I bumped into yaw drift on a dive Monday while testing the Water Linked USBL system. ArduSub V4.5.0-beta1 (bd91022) https://drive.google.com/file/d/1h2npsu_z4UO-8kSVQ9xcpAakQgzCqxX0/ |
We can sporadically see a persistent yaw drift despite having a very good magnetic heading.
This happens randomly and seems to away when rebooting.
This has happened both on Navigators and Pixhawk 1
It seems to be related to SUB having INS_GYR_CAL=0 for default, which can lead to significant gyro bias at boot.
We have multiple reports of it happening in 4.0.
Related thread in discuss: https://discuss.bluerobotics.com/t/steady-uncommanded-yaw-in-depth-and-stabilize-modes/10260
As it is not trivial to replicate, I'm not 100% sure if this still happens in master.
We still need a good log with LOG_DISARMED=1 and LOG_REPLAY=1.
Current reports/logs:
gcelec at discuss.bluerobotics
The text was updated successfully, but these errors were encountered: