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

SESync results matrix sometimes flips #34

Open
Mnzs1701 opened this issue Jul 18, 2023 · 1 comment
Open

SESync results matrix sometimes flips #34

Mnzs1701 opened this issue Jul 18, 2023 · 1 comment

Comments

@Mnzs1701
Copy link

Thank you for your extraordinary work, I was attempting to use SESync for a realtime SLAM, however I am facing an issue, while running SESync periodically, the results.xhat matrix inverts values abruptly.
The SESync Result is as follows:

[ INFO] [1689674506.598137576]: SESync x: -0.709801 y: -0.002066
[ INFO] [1689674506.649726984]: SESync x: -0.709801 y: -0.002066
[ INFO] [1689674506.698200718]: SESync x: -0.734062 y: -0.000417
[ INFO] [1689674506.748467310]: SESync x: -0.734062 y: -0.000417
[ INFO] [1689674506.798415183]: SESync x: 0.001456 y: 0.759772
[ INFO] [1689674506.848358097]: SESync x: 0.001456 y: 0.759772
[ INFO] [1689674506.898409615]: SESync x: 0.001456 y: 0.759772
[ INFO] [1689674506.948645089]: SESync x: -0.783955 y: 0.002026
[ INFO] [1689674506.998515216]: SESync x: -0.783955 y: 0.002026
[ INFO] [1689674507.048347022]: SESync x: -0.783955 y: 0.002026

The x and y values get interchanged for a certain set of measurements and abruptly return to normal. The code I am using to access these values is

results = SESync::SESync(measurements, opts);  
int latest_result = results.xhat.cols()/3;      

double x ,y;
x = results.xhat.col(latest_result-1)[0];
y = results.xhat.col(latest_result-1)[1];

If one more value is added and SESync is rerun the output returns to normal. It appears to invert almost randomly. I have printed two consecutive result matrices into a google sheet here

Thanks in advance!

@Mnzs1701
Copy link
Author

Mnzs1701 commented Aug 1, 2023

It looks like I can fix this by changing the reflector matrix here. Currently the code does reflection over the x axis using the following matrix

1  0 
0 -1

Intead we need to reflect over the y=x line

0  1
1  0

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

1 participant