Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 139 forks source link

Using Coarse Relocalization + IDs on Watchers #145

Closed rogueyoshi closed 4 years ago

rogueyoshi commented 4 years ago

What's the best practice for this? Suppose I want to get nearby anchors with the sensor data, but also simultaneously get the anchors which were made in a session without sensor data. If we run two watchers, we get a concurrency error. Should we daisy chain the second instead from the LocateAnchorsCompleted event?

Merichbier commented 4 years ago

I guess that could be a solution. What we made is a queue in which we add the locate criterias and since only one watcher can run we wait it to finish to start the next one.

jparismorgan commented 4 years ago

Hi @rogueyoshi, this isn't currently supported today, but we are thinking about supporting multiple Watchers or expanding what you can do with locate criteria! @Merichbier's suggestion seems reasonable as a workaround.

tomkrikorian commented 4 years ago

I'm using the same workaround as @Merichbier. Multiple watchers or more identifiers would be amazing @julianparismorgan !

jparismorgan commented 4 years ago

If you could post it as a suggestion to our UserVoice, that would be great! https://feedback.azure.com/forums/919252-azure-spatial-anchors

If it's okay with you, I'm going to close this issue and it can be continued on UserVoice!

tomkrikorian commented 4 years ago

Done :)

Here is the link to the suggestion : https://feedback.azure.com/forums/919252-azure-spatial-anchors/suggestions/40207366-multiple-watchers-and-or-more-watcher-options