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
What todo with the terrain estimator #3917
Comments
@AndreasAntener I can tell you that we are working on an integrated terrain estimator for ekf2, so we will not use the existing terrain estimator in the library. I guess for now the terrain estimator is still important for fixed wings which use the old ekf. |
@Tumbili ok, any suggestions what we should do with INAV? Its currently mixing both and the bottom estimate published in local position is an unfused lidar reading. |
@Tumbili who's working on INAV/Flow the most now? I was wondering if it would be ok if we just publish the bottom distance in local position also from the terrain estimator instead of the plain lidar value. |
If needed i could make the terrain estimator publish on lpos and change inav to use that |
For LPE, I am getting ready to add a separate terrain altitude state (vertical distance above terrain). The issue is really that you lose your global altitude accuracy from lidar if you give it a separate terrain altitude state. That means that if we want precise terrain following, we need two modes in mc_pos_control. One that tracks terrains altitude, and one that tracks global altitude. The easiest approach would just be to make this dependent on a parameter that the user can set, similar to yaw mode. |
@jgoppert I agree, for that the position controller would need two modes, which also would allow him to react on the loss of the terrain estimation. Since your explanation on the dev call I think I'm one step further here. But I still don't fully understand your comment I think ;). If one flies outside the lidar range and back in again, you might end up with an offset global altitude compared to terrain estimation. Is that what you meant? Here I was only talking about letting INAV publish the separate terrain estimation (for local and global), but actually let it internally do what ever it wants (not messing with it). |
@AndreasAntener I just added terrain estimation to LPE and test flew it. For now I'm outputting AGL as local z. I'm also sending terrain altitude so if we fix mc_pos_control, it should work well. tz is the distance of the altitude relative to the home altitude. The dynamics I'm using are just: with sonar/lidar measuring: So when it goes out of range the the tz state freezes, and the AGL is reasonable, difference just estimated from change in ASL (from baro/ gps). |
Closing this, as the old terrain estimator is/can be used with INAV but the new estimators bring their own. Position reset logic with the old one is not implemented though. |
@LorenzMeier @Tumbili
We have a separate terrain estimator and the position estimators which sometimes also provide a bottom estimate. I don't know your plans for the position estimators. Should we remove the terrain estimator where the position estimator provides a bottom estimate? Should both estimates co-exist?
The text was updated successfully, but these errors were encountered: