02-23-2023 12:40 AM
So I've been testing spatial anchors for a few days and I wanted to make a post to share my progress with the community. There is a little "tutorial" in the end of the post for those who wants to implement the Sharing Spatial Anchor feature.
So far I've seen some issues and wanted to ask you everyone if you think Spatial Anchors are ready to use for bussiness purposes. We wanted to create a AR space with multiple users conected in a local network, but when I configure the spatial anchor it sometimes get a little displacement (4~5 cm) and that can lead to displacement virtual objects in the room. I thought about making multiple spatial anchors and getting some kind of average center point to solve the displacement issue.
The second problem is that sharing this spatial anchors to other users (with the new sharing feature) seems to make another little displacement in other users. So... Am I missing something? Maybe I need to walk around the real room so the oculus quest 2 get all the "tracking points" in the room? Cause I've read the anchors uses real world traking points to get the location of that anchor.
So I dont know if this feature is really thought for oculus quest 2 or maybe they are improving this feature in the oculus quest pro - oculus quest 3.
And here is the tutorial for sharing spatial anchors:
So far this is my progress and maybe could help the ones that wanted to use spatial anchors.
Oculus provide this project so you can learn how all the functions works (create the spatial anchor, save it into the devices and share it to othres)
https://github.com/oculus-samples/Unity-SharedSpatialAnchors
To be clear, the sharing option is not a function that the oculus quest does, it is more a function that "you" have to implement in your network system so you can send the spatial anchors info to other users. They uses Photon in the example but you can use another network systems like Mirror or Netcode for gameobjects.
Once you open the project it is not enough to make a build and run it into the device. You have to upload it to the Meta developer manager (the store from oculus quest).
https://developer.oculus.com/manage
There you have to create an app so you can get the AppID that you have to write in the Oculus Platform Settings of the project, If you dont set the appID the share spatial anchor feature wont work.
Now you can make the build. And then upload it to the meta store (you can use the Meta Quest developer Hub) I recomend to upload it as an Alpha version if you are testing.
https://developer.oculus.com/downloads/package/oculus-developer-hub-win
Then go back to the Meta developer manager and searh for the Release channels and click in the alpha version you uploaded
Then you have to give you access in the users tab so the app will show in your devices app's
Annddd now the think that cost me 2 days of work. In order to work, the spatial anchors needs to get to your device ID, and to do that, the app needs some permissions. So you had to enable the appID on the Data use Checkup (in the left menu) I also recommend to set the user profile request access (just cause oculus recommneds it too)
And now you can download the app in your device from the All apps menu in your oculus and use the example of sharing spatial anchors.
Hope it helps someone.
05-18-2023 12:24 PM
Hi,
I've done all the pre-setup I could think of (photon setup, oculus app created, user ID, user profile requested, add both accounts as the test user) but I'm still stuck on an error "OnShareCompleteResult : -1006". Could anyone provide more info about this error code? I always got 1 correct user id and 0 from my both quest pro devices. I guess the 0 might be the reason why the sharing failed.
Could you confirm the userids you got are all correct?
09-14-2023 11:17 AM
I had the same problem but it was because I hadn't installed a Meta Quest 2 software update.
11-02-2023 07:15 PM
Hi Shavier,
Many thanks for the post, I am in a similar project than you and have the same main issue: spatial anchors are drifting, you cannot trust them to mark thinks like walls as they drift (in my case) more than 20cm. Did you had any luck sorting it out?
11-03-2023 06:10 AM
Yeah if you are sharing the spatial anchors it is normal to have a some drift. The more you walk through the room the more information the device will collect. Probably you'll need an empty space (not much furnitures so the device doesn't get to much information noise). We finally didn't use the sharing spatial anchors in our project cause it get us more problem than just creating an spatial anchor for each device, So yeah... i think they still need to make some improvements in the way you share an spatial anchor but also I dont think its too easy to share real world information according to your room reference points and hoping all devices get the same room reference points.
Maybe with Quest3 this will improve.
11-03-2023 07:23 PM
Actually the drift already appeared with non-shared anchors, but you gave me a key in your last message that helped me a lot... I thought Oculus calculated the anchors based on topologic info like deep, etc... so I thought a corner was a very easy to find spot as has different normals at every side. But it is the opposite, looks like the system, at least in Quest II, relies more in pattern detection. Just using shaped coloured papers as "markers" stick to the walls or corners where to place the anchors we had a much better precision and almost no drift. Even the anchors placed in not marked places are much more solid when a few of them are in marked places. Of course, not all the projects or environments can be marked with visual aids but at least in our case it was a good workaround!
12-13-2023 04:54 AM
Thank you, my friend. I was strugling in "unknown origins".... now i know "you have to give you access in the users tab so the app will show in your devices app's" awesome!
03-17-2024 06:30 PM
Are you using URP (Universal Render Pipeline) by any chance? I had a similar issue, and when I switched back to the built-in rendering pipeline, the problem went away.