-
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
Working code for single basestation #465
Conversation
I'm not sure if a squash of all commits is needed, let me know if so |
Forgot to mention that the basestation positions need to be converted to with respect to CF |
accb5db
to
9fc1d8b
Compare
I did a quick test of your code today. It seems to work partially in our lab, when we block the slave base station the position seems to be OK but if we block the master base station the position moves away about 3 meters. Not sure why. Even though everything is not working, it seems as you are on to something. How do you want to proceed with this? |
The development and initial testing was done in a 5x3.5m space, which seems to work well when blocking any BS (except for the 5-15cm shift when switching) I noticed a similar issue with position when I tried it in a large space (10x4m) I'll need some time to debug at the larger area as the issue seems more obvious. How far apart are your BS in your setup / how large is the space? I hadn't had any issue with radio connectivity, but I had issues with position readings spiking at fixed intervals. Couldn't it be related? |
Hi @NicksonYap , i was looking a bit at this again and this PR is getting pretty large :-) |
@krichardsson I'll combine/squash the commits into smaller chunks before actual merging of the PR I've fixed several issues and increased the reliability in the smaller 5x3.5m space (doesn't jump abruptly when switching BS), Regarding documentation, I had actually derived the formulas myself, not sure if i'd want to show step by step, but I do have a MATLAB file to visualize, test scenarios and prove that the math is valid (will share when going to merge) Regarding the issue you had initially when testing the repo, can you send me your BS geometries/matrices? This way I can check if they are correct by visualizing in MATLAB, and know exactly how large the space is, |
@NicksonYap We have chosen to write our own implementation, see #461. Thanks for your work none the less! |
Add pre-commit hooks for flake8
Hi,
I've managed to implement the formula in MATLAB into CF, turns out there are some heavy calculations required to solve the matrix equation (involving SVD & pseudoinverse) but was turned into a simple function in MATLAB.
The algorithm works by gathering all possible Ray vectors (max 4 sensors * 2 BS = 8 rays)
Then get all the possible pairs of rays, calculate the center and average them
(max only using 12 pairs due to performance issue)
This will will work no matter the combination of sensors or basestations, as long as a pair of rays can be retrieved.
It requires the Rotation Matrix and can only accept 2 rays per position calculation.
(I've concluded that any trying to get Position and Pose using >2 rays will require some kind of solver)
Solves: #461
The code used here is quire heavy, but it works so it should be consided as beta.
The ideal implementation could be a direct port from of the most minimalisic implementation from libsurvive
Note that when switching reception between different basestations or between single to dual basestation, the estimated position may shift (5-10cm for my case), but kalman filter will try to reduce the impact.
Reasons:
It should also slightly improve reception and accuracy when using 2 BS (allows different sensor to receive from different BS, and averages up to 12 times)
Try this at your own risk!
:)