Open LudwikJaniuk opened 7 years ago
Tango's loop closure optimization pass can improve the remembered trajectory, but it won't be perfect. It sounds like the red markers were off before you saved and they got stored in that off state. Further, repeated traversal along the path of the markers can help Tango learn that you just walked back and forth along a line.
I hope this clarifies things. Please tell me if you have any more questions.
Thank you for replying. I was specifically trying to make the red markers be placed in an off state, to see loop closure correction "in action". While I understand the improved trajectory won't be perfect, the results look like it didn't happen at all, leading me to believe that there's rather something wrong with the code that updates the markers' locations to match the updated estimated trajectory. Are you saying that the loop closure correction effect is really so miniscule that it's consistent with what I saw in my experiment? What it looks like is that Tango updates its camera position by several meters on the loop closure event, but the remembered trajectory is improved only by a few centimeters. To clarify my question, I modified the picture from the docs:
When saying the improved trajectory won't be perfect, do you mean it will be closer to the magenta or orange trajectory I drew? Because from the experiment it looks like the orange one, but that would be quite disappointing.
Also, if that's the case, could you propose a different experiment I could perform to see loop closure correction in action? I want to extend it to other objects, but don't I like the idea of coding it without being able to validate that it works.
This issue is still bugging me. I'm currently resorting to scanning the whole area once before doing anything in it, but it would be nice to knwo what is going on here.
Final result: the red markers should be "leading up" to the blue one.
It seems that the loop closure correction on ARMarkers in the AreaLearning example (this code) is not working. I have created a test to make this visible, and even tho a loop closure event occurs, the markers are not moved to the "correct" positions on save.
The way I test this is the following:
So it seems that for some reason, the loop closure correction is not working. However, the code does seem to be doing the right thing (it is correctly asking for poses for the areaLearning/Device frame pair, instead of the startOfSetvice/Device frame pair. If it was asking for the second one, it would indeed not get the updated trajectory, according to the docs on frames of reference. But now, it is doing the right thing (I think), so what might be causing this behaviour? Is this an error in the sample, or something wrong with the Unity SDK itself? Or am I simply misunderstanding what loop closure correction is really supposed to be doing?
Any indication on what might be the cause of this problem is greatly appreciated, as I'm trying to implement loop closure correction on my own project, and using this code as an example. For example is it possible that the tango poses are actually not being updated, even tho a loop closure event happens?