Skip to content
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

Closed
AlexisTM opened this issue Mar 8, 2019 · 5 comments
Closed

Decoupling the TDoA ranging system. #403

AlexisTM opened this issue Mar 8, 2019 · 5 comments
Milestone

Comments

@AlexisTM
Copy link

AlexisTM commented Mar 8, 2019

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:

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.

Changing the "goal" to the last measured value will definitely make it capable of fast convergence but will have a localization issue if the robot height goes close to the plane of the anchors. Indeed, the convergence could be to the wrong height then.

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.

@krichardsson
Copy link
Contributor

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.

@AlexisTM
Copy link
Author

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.
The roadrunner is therefore converted from a robot to a sensor of a robot. In such a case, depending on the robot, you (user) might want the fused or raw data stream.

@krichardsson
Copy link
Contributor

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.

@AlexisTM
Copy link
Author

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.

@krichardsson
Copy link
Contributor

We usually try to keep it simple and minimalistic :-)

krichardsson added a commit that referenced this issue Mar 15, 2019
…is breaks the wide spread dependency on the kalman filter.
krichardsson added a commit that referenced this issue Mar 15, 2019
krichardsson added a commit that referenced this issue Mar 19, 2019
@krichardsson krichardsson added this to the next-release milestone Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants