About one year ago, I developed an application for Hololens 2 using Azure Spatial Anchors. This application can create, retrieve and delete anchors. It worked well. Today, I tried to use the application again. The anchor creation works but I can not retrieve my anchor.
I use AzureSpatialAnchor SDK 2.1.1. Here is the code for retrieving my anchors :
AnchorLocateCriteria criteria = new AnchorLocateCriteria();
criteria.Identifiers = anchorsToFind.ToArray();
azureWatcher = azureSession.CreateWatcher(criteria);
Of course, I defined a method for callback when anchor has been retrieved :
azureSession = new CloudSpatialAnchorSession();
...
azureSession.AnchorLocated += OnAzureAnchorLocated;
public void OnAzureAnchorLocated(object sender, AnchorLocatedEventArgs args) {
AddToActionQueue(() => {
DebugConsole.LogMessage("OnAzureAnchorLocated");
switch (args.Status) {
case LocateAnchorStatus.Located:
case LocateAnchorStatus.AlreadyTracked:
PlaceAnchor(args.Anchor);
break;
case LocateAnchorStatus.NotLocatedAnchorDoesNotExist:
// The anchor was deleted or never existed in the first place
// Drop it, or show UI to ask user to anchor the content anew
DebugConsole.LogMessage("Anchor does not exist");
break;
case LocateAnchorStatus.NotLocated:
// The anchor hasn't been found given the location data
// The user might in the wrong location, or maybe more data will help
// Show UI to tell user to keep looking around
DebugConsole.LogMessage("Anchor not located");
break;
}
});
}
I have no error and no message (located, alreadyTracked, doesNotExists, NotLocated)
Taking a look in the spatial anchor supervision in Azure portal, I can see one creation request but.. no queries request !
Does someone know how I could solve my problem ?
Thanks.
Olivier.