-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ukf #1159
Ukf #1159
Conversation
Hi! Thanks for this! Unfortunately there seems to be some build errors so I'm not sure if that is something you can try to solve? It seems to go wrong when all configs in kbuild are set to yes or random. |
Hey! |
Hi! Unfortunately there are currently conflicts too if we try to merge this... Probably relatively easy to fix but we shouldn't wait too long with this. What is the ETA for updating this PR? |
Hi! We examined the allocated stack size for the task running the UKF more closely and it was set much too high. It was possible to reduce the stack size so far that now no overflow of the CCM occurs. Further changes to the source code were not necessary. |
Sets the loco deck reset pin to GPIO_IO4. Requires a accordingly modified loco deck with a connection to GPIO_IO4.
Thanks! We are still a bit low here on staff so we need to find time to test this out in the next two weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Sorry for the delay! It was difficult with the winterbreak in between to get started with this big PR 😅
I have already a first batch of comments. There are a couple of things to consider I think.
- The error_estimator_uki.c is very large. Have you considered splitting it up like was done with the kalman_core?
- There are several functions that exist, like matrix transpose or such that already exist in the crazyflie-firmware already as standard math functions. In generic the firmware is already a bit inconsistent with that (see this ticket Unifying math functions #1182) but still.
- Documentation: In the comments I noted that you could add comments to the logs and parameters so that they will be autogenerated in the web like here . Also you could also add a piece of text in the state estimation page on the web ( source ).
So there are quite some comments indeed... but on the other hand, the estimator is also turned off by default in kconfig and then everything in one file is actually a bit handier for the time being...
I will discuss with the rest once everybody is back at the office next Monday on their opinion.
Hi! Me and @krichardsson discussed a bit and came to the conclusion that in general it would be fine to merge this all as one file, especially since the filter is disabled in kbuild. So I've resolved some of the parts I've mentioned above. However we do think that by minimal there should be some documentation.
I also flight tested it:
|
Hey, great to hear that. Honestly, it is a time issue to optimize the code and restructure it (what could be done in general - since there are some functions are already implemented in the existing framework and are somehow redundant). Documentation: I will have a look on it (by the very end of the week). Do I need permissions to modify it or send you the text? Flight Test
For now, I think I should state in the documentation that the use case is LPS and LPS & Flow, Maybe spend a comment on setting different parameters for qualityGateTof for pure Flow-case. |
I can help out with fixing all code-related things that I mentioned, so I'll push that to this branch soon since I have write access to that branch. If you indeed could suggest a piece of text that we can add at the documentation, then I'll take care of that as well. |
Hey, that would help indeed. I'll provide a text for the documentation in the next days - next weekend at latest. |
Alright! I've pushed the changes and doc! Another big change is that I've renamed the error_estimator_UKF.* to estimator_ukf. This is out of consistency with the other estimators and it would be easier for people to find the code. Moreover, the documentation already states the error-state' preamble several times already so I think that most get the picture. Also, I've removed the part of the lighthouse, as I think it would be better to put that into the issue list. https://github.com/bitcraze/crazyflie-firmware/issues @keffklau Are you okay with the latest changes I made? |
This branch includes the error-state unscented Kalman Filter based on the simplex sigma-point selection strategy for improved flying qualities especially when relying on LPS-TDOA localization method. The filter was presented on Fusion 2022 and is described in the paper below:
Klaus Kefferpütz, Kimberly McGuire: Error-State Unscented Kalman-Filter for UAV Indoor Navigation, 2022 25th International Conference on Information Fusion (FUSION), https://ieeexplore.ieee.org/abstract/document/9841385
The algorithm supports
The filter can be selected within the kbuild menuconfig.