Can't retrieve Azure Spatial Anchor (unity3D, Hololens 2)

Olivier Martineau 1 Reputation point
2021-08-26T08:01:41.773+00:00

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.

Azure Spatial Anchors
Azure Spatial Anchors
An Azure service that is used to build immersive three-dimensional applications and experiences that map, persist, and restore content or points of interest at real-world scale.
87 questions
HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
381 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,031 Reputation points
    2021-08-27T01:24:46.67+00:00

    Hello @Olivier Martineau I hope the below info helps with your initial query.

    The minimum supported version is ASA SDK 2.7.0. Please make sure to update to the latest SDK (ASA SDK 2.10.2).

    Please have a look at the : ASA SDK 2.7.0 is the Minimum Version

    Please comment in the below section for further help in this matter. If the response is helpful, please click "Accept Answer" and upvote it.