Spatial Anchors not detected relative to the one in view

David Francis 21 Reputation points
2022-10-20T07:23:56.367+00:00

We are having the following issues which seem to be bug-driven:

Problem: Unable to load any anchors connected to the currently detected anchor.

Step to loading connected anchors:

Place multiple connected anchors

Create a session

Place an anchor in AR

Upload it Azure Servers

Repeat steps a and c to place multiple connected anchors (within the same session)

Viewing anchors

Create new session

Enter id for one of the anchors created in step 1

Fetch anchor from Azure Servers

Create a watcher for fetched anchor

AnchorLocated gets called and loads anchor

A new watcher is created with:

m_scourceSpatialAnchor being anchor loaded in step e

    var nearAnchorCriteria = new NearAnchorCriteria();  
    var anchorLocateCriteria = new AnchorLocateCriteria();  
      
    nearAnchorCriteria.SourceAnchor = m_scourceSpatialAnchor;         
    anchorLocateCriteria.NearAnchor = nearAnchorCriteria;  
    m_spatialAnchorManager.Session.CreateWatcher(anchorLocateCriteria);  

No other anchor is detected or loaded

AnchorLocated event gets called once (regardless of the number of connected anchors) but with AnchorLocatedEventArgs status = AlreadyTracked

Note: all anchors can be viewed and loaded individually.

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
399 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nathan Manis - MSFT 481 Reputation points Microsoft Employee
    2022-10-20T20:15:45.197+00:00

    Hi @David Francis ,

    For this one, is this with a specific device? HoloLens? Phone? Tablet?

    Also, can you advise what version of the ASA SDK you are using for the project? This should work if the wayfinding steps are followed:
    https://video2.skills-academy.com/en-us/azure/spatial-anchors/concepts/anchor-relationships-way-finding

    From the sample, you may just need to add more to criteria for distance and count you want:

    NearAnchorCriteria nac = new NearAnchorCriteria();
    nac.SourceAnchor = nearbyAnchor;
    nac.DistanceInMeters = 10;
    nac.MaxResultCount = 3;

    Thanks,
    Nathan


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.