"Dynamic" Spatial Anchors
Is there a way to track the virtual position of a real moving object with the Quest? For example a ball that is rolled across a table (example). Alternatively does anyone have guidance or examples of using one of the quest controllers (maybe the Quest Pro controller is most relevant for this) or some other sensor that can interface with the Quest to get its position without necessarily being held in the user's hand? My use-case is to track a physical robot in mixed reality so that I can display robot relative visualizations (e.g. LiDAR) from the correct coordinate frame / pose.1.1KViews0likes3CommentsOpenXR error XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB in build when Mixed Reality scene loaded
Hi, I am getting spammed by the following error after I load my mixed reality scene (room) via the OVRSceneManager.cs [XRCMD][failure] [XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB]: xrLocateSpace(*(XrSpace*)space, baseSpace, ToXrTime(GetTimeInSeconds()), &spaceLocation), arvr/projects/integrations/OVRPlugin/Src/Util/CompositorOpenXR.cpp:11311 (arvr/projects/integrations/OVRPlugin/Src\Util/CompositorOpenXR.h:318) The mixed Reality room seems to load fine (mostly), and I am able to localize all anchors, but logcat is being spammed by the error. Not sure it's related, but also getting this error often: AnchorManagerHelpers: The tracked root node uuids are different?! 0efe69dd-c03e-a729-a4b2-3108ac493f34 - 00000000-0000-0000-0000-000000000000 Any ideas how to get rid of the error, please? Thank you. Unity 2021.3.25f1, Oculus integration v56.0, OpenXR Plugin 1.7.0, Oculus XR Plugin 3.3.0 Quest 2 and Quest Pro1.1KViews1like1CommentLoading unbound anchors returns [0 or anchors_count_till_last_session] (NOT null)
I saved the anchors' uuid in the playerprefs after creating them - it's getting created successfully. Then, I tried to load the anchors in the same session without quitting the app (my use case is to visually clear the anchors after saving and loading them on the user's command) - the resultant anchors-array from LoadingUnboundAnchors is NOT null but it contains only anchors from last session. Once I quit and reopen the app, the anchors are loading successfully. I want to load them before quitting the app as well (I mean in the same session). Any ideas on why this is not happening?? Or any suggestions on how to implement this? OVRSpatialAnchor.LoadUnboundAnchorsAsync(loadOptions).ContinueWith(anchors => { if(anchors == null) { Debug.Log("Anchor Sample: Load anchors failed with null result."); } Debug.Log($"Anchor Sample: anchors available {anchors.Length}"); //length is zero if loaded in the same session or it is equal to the number of anchors created till the last session });316Views0likes0CommentsProblems with Spatial Anchors
Hello, I've been having some issues for quite a while with spatial anchors. I tried to dabble with them some months ago with little success and now I'm trying again. I've had very inconsistent result with the samples where sometimes they work and other times I can't even place the anchor. In my code all I want to do for now is call this function to place the anchor: public void PlaceLeftAnchor(Vector3 position, Quaternion rotation) { SpatialAnchor anchor = Instantiate(m_AnchorPrefab.GetComponent<SpatialAnchor>(), position, rotation); anchor.SaveAnchorLocally(); } and here is the SpatialAnchor code based on the oculus samples: using System.Collections; using UnityEngine; [RequireComponent(typeof(OVRSpatialAnchor))] public class SpatialAnchor : MonoBehaviour { [SerializeField] private OVRSpatialAnchor m_SpatialAnchor = null; public string Uuid { get => m_Uuid; } private string m_Uuid = ""; private IEnumerator Start() { while (m_SpatialAnchor && !m_SpatialAnchor.Created) { yield return null; } Debug.LogError($"Achor created. Enabled?: {m_SpatialAnchor.enabled}"); } public void SaveAnchorLocally() { Logger.Instance.LogError($"Saving anchor start. Status of anchor component: {m_SpatialAnchor == null} / {m_SpatialAnchor.enabled}"); m_SpatialAnchor.Save((anchor, success) => { // --> Never reaches this part <-- }); Logger.Instance.LogError($"End of Save Anchor"); } } I don't manage to receive a callback within the m_SpatialAnchor.Save function and that seems to be the case due to the spatial anchor self-destructing itself. I get this error: As a side note, I noticed that the anchors weren't working in the samples, until I added this line (<uses-permission android:name="com.oculus.permission.USE_ANCHOR_API" />) to the manifest. Now I was able to place and save the samples, but that wasn't enough to fix my own implementation. Perhaps I am missing more permissions? If would greatly appreciate anyone who could provide insights or their own working example of a spatial anchor implementation.2.2KViews0likes1Comment