-
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
Decoupling the TDoA ranging system. #403
Comments
A first step could be to generalize the functions (https://github.com/bitcraze/crazyflie-firmware/blob/2019.02/src/modules/interface/estimator_kalman.h#L68-L73) in the kalman filter that are used to push sensor data to the filter. A generic version of the functions should be implemented in estimator.c that passes the call on to the active estimator. This would enable you to add a new estimator implementation that do what ever you are interested in. TDoA3 produces around 300 TDoA measurements/s, where each measurement contains the position of the two anchors + the difference in distance to the anchors. The total data rate of raw TDoA data should end up around 10-15 kilo bytes/s. Currently there is no functionality to stream the data off from the Roadrunner, but from a technical point of view it should be possible. You could even implement a "virtual" estimator that streams the raw TDoA data + other sensors to an external system that estimates the position and then streams the result back to the estimator. |
Note that the use-case I am pointing out is not about improving the estimator, but outsourcing the estimator to a more powerful and generic estimator (robot_localization) that runs on a different machine. |
I hope the suggested solution would support this use case, as well as alternative estimators if someone would like to work on that. And it would break some dependencies in the code that will make it cleaner and more testable as well, which is nice. |
The solution that PX4 chose is to use a communication middleware between tasks instead of static queues (uOrb, now going to FastRTPS). That allows decoupling estimator and sensor tasks. Yet, such modification is huge. |
We usually try to keep it simple and minimalistic :-) |
…is breaks the wide spread dependency on the kalman filter.
Context
One of the use-cases of the Roadrunner if a Robot localization system.
In such systems, we often have high computation capable systems (onboard computers) such as the Odroid XU4 or other embedded Linux devices. In such cases, every robot has a fined-tuned EKF running incorporating their kinematics. It this use-case, the roadrunner is fixed onto the robot and connected either in UART or USB.
Precedent steps taken for each issue for this use-case:
crazyflie-firmware/src/drivers/src/watchdog.c
Line 78 in e998ddc
Proposition
Therefore, we would like to decouple the position estimation of the TDoA off the Kalman filter to allow to fuse it in the onboard EKF filter (robot_localization in our case).
I salvaged a Python library to test the behaviour of localization: AlexisTM/Multilateration. It is a proof of concept of multilateration using LSE minimization method on a list of circles. It computes the first approximation of position which is then minimized.
In this fork, I added a "goal" which will force one or the other axis to be first approximated to a fixed value. That allows computing an XYZ position from anchors which are all on the same height for a robot which is at a known height. Indeed, the minimization process will then be forced to converge to the correct value and not the ambiguity.
If such an algorithm works well, we could create an alternative estimator that returns the "raw UWB measurements".
As a flaw, I see that this method does not provide the "estimated error" which is primordial for further fusing. I guess this can be estimated from the way the circles (anchor position + measurement) interacts to each other. There should be a paper providing an analytic solution.
The text was updated successfully, but these errors were encountered: