Spatial Anchor Pins do not save

Justin Eslinger 31 Reputation points
2021-10-20T06:25:42.447+00:00

We are experimenting with Microsoft's Azure Spatial Anchors. And we have followed the guides online and have had it work with 4.25 and Hololens. However, we're failing to get it to run on iOS 14.7.1 and unreal 4.27 . We have an Azure subscription set up according to their docs and are logging the outputs. We're seeing a successful connection. However, when we go to save an ARPin, it outputs "Failed to create azure spatial anchor: 0x28084f000. 0x10a3b8eac" The numbers change each time you go to save. Another error that we're getting is "LogAzureSpatialAnchorsARKitInterop: Azure Spatial Anchors: OnError - Not enough Neighborhood Spatial Data was available to complete the desired create or update operation". I have walked around my entire room which has a lot of features to pick up. It's well lit. I've moved slowly to ensure that the entire room is being tracked. I keep the tracked pin in view while saving. Not sure what else to try. I didn't see any tutorials or documents where it had inputs connected to "Config Session 2". I see there's ports for Access Token, account id, account key, account domain, and authentication token. All of these values are active in my BP_ARPawn blueprint.

I saw a Unity sample project where you have to have a confidence rating over 1.0 to create a pin. Is there something similar in Unreal?

Any help would be greatly appreciated! Thanks!

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.
86 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jackson Fields 186 Reputation points
    2021-11-05T03:23:17.637+00:00

    @Justin Eslinger the app you uploaded appears to be a blank AR Template, I do not see any ASA code in it.

    I have made a project with 4.27's Handheld AR Template here:
    https://1drv.ms/u/s!AmC-atmmBtrhm6pL6xjsZuSvyn7lmg?e=sQpAs9

    You will need to set the Account ID, Key, and Domain in BP_ARPawn's StartASA function.
    You will also need to set your IOS Team ID in Project Settings > IOS > Build.

    Create an anchor by clicking on the screen - a pink box will appear at the surface collision
    Monitor your Azure Portal for created anchors.
    Press the bottom-center button to create more anchors.
    Relaunch the app after anchors have been created to relocate.

    Another consideration is that this sample is using course relocation to find nearby anchors easier. Since iOS only supports GPS and Bluetooth beacons (https://learn.microsoft.com/en-us/azure/spatial-anchors/concepts/coarse-reloc#platform-availability) you may be having trouble with this if you are inside with a poor GPS connection. You could modify the sample to not use course relocation and specify explicit anchor identifiers (from previously saved anchors) in the CreateASAWatcher function. (If logging all output, the anchor IDs should be available in the output log)

    1 person found this answer helpful.

  2. António Sérgio Azevedo 7,661 Reputation points Microsoft Employee
    2021-10-22T12:39:53.737+00:00

    Hello @Justin Eslinger ,
    I have confirmed with Product Team that the documentation here was recently updated, are you following the prerequisites specified there?

    See more on he following doc: Azure Spatial Anchors in Unreal

    Specifically for iOS:

    1. Location Services will need to be started (InitLocationServices/ StartLocationServices)
    2. Ensure that you enable CourseLocalizationSettings with gps and wifi in ConfigSession2. It may also help to change the “Log Verbosity” to “All” in ConfigSession2

    Thank you so much.

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.