Loading Runtime/Resources/ARFAnchorTrackingPrefab.prefab +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 m_IsActive: 0 --- !u!4 &5663275178603938767 Transform: m_ObjectHideFlags: 0 Loading Runtime/Scripts/WorldAnalysisARFoundation.cs +5 −1 Original line number Diff line number Diff line Loading @@ -393,8 +393,13 @@ public class WorldAnalysisARFoundation : MonoBehaviour, WorldAnalysisInterface } } /// Collect relocalization information ETSI.ARF.OpenAPI.WorldStorage.Response response = RelocalizationInformationRequest.GetRelocalizationInformation(m_worldStorageServer, uuids, modes, capabilities); if(response == null) { Debug.Log("ESTI ARF GetRelocalizationInformation : request response is null"); } relocInfo = response.RelocInfo.First(); //Only one uuid requested } else Loading @@ -408,7 +413,6 @@ public class WorldAnalysisARFoundation : MonoBehaviour, WorldAnalysisInterface /// Subscription not possible return InformationSubscriptionResult.NONE; } return CreateSubscriptionWithRelocalizationInformation(relocInfo, uuid, mode, callback, ref validity, out subscriptionUUID); } Loading Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs +13 −2 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati /// <returns>geopose or not (does not check is solved)</returns> public bool AddTrackable(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { Debug.Log("GEO : Add Geosptial Trackable"); if (!geospatialSupported) return false; if (trackable.TrackableType != ETSI.ARF.OpenAPI.WorldStorage.TrackableType.GEOPOSE) Loading Loading @@ -113,19 +114,29 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati /// <param name="trackable"></param> public async void CreateGeosptialAnchor(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { double[] values = new double[trackable.TrackablePayload.Length / sizeof(double)]; for (int i = 0; i < values.Length; i++) { values[i] = BitConverter.ToDouble(trackable.TrackablePayload, i * sizeof(double)); } if (geospatialSupported) { while (ARSession.state == ARSessionState.CheckingAvailability || ARSession.state == ARSessionState.None || ARSession.state == ARSessionState.SessionInitializing || m_arEarthManager.EarthState != EarthState.Enabled || m_arEarthManager.EarthTrackingState != TrackingState.Tracking) { Debug.Log("Geo : checking " + ARSession.state + " " + m_arEarthManager.EarthState + " " + m_arEarthManager.EarthTrackingState); await System.Threading.Tasks.Task.Delay(100); } if (m_arEarthManager.IsGeospatialModeSupported(GeospatialMode.Enabled) != FeatureSupported.Supported) { geospatialSupported = false; Debug.Log("Geo : not supported"); } else { double[] values = new double[trackable.TrackablePayload.Length / sizeof(double)]; values = new double[trackable.TrackablePayload.Length / sizeof(double)]; for (int i = 0; i < values.Length; i++) { Loading Loading @@ -164,7 +175,7 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } else { Debug.Log("ARCore Geospatial Anchor No correspondance for Local Anchor " + localId); //Debug.Log("ARCore Geospatial Anchor No correspondance for Local Anchor " + localId); continue; } Loading Loading
Runtime/Resources/ARFAnchorTrackingPrefab.prefab +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 m_IsActive: 0 --- !u!4 &5663275178603938767 Transform: m_ObjectHideFlags: 0 Loading
Runtime/Scripts/WorldAnalysisARFoundation.cs +5 −1 Original line number Diff line number Diff line Loading @@ -393,8 +393,13 @@ public class WorldAnalysisARFoundation : MonoBehaviour, WorldAnalysisInterface } } /// Collect relocalization information ETSI.ARF.OpenAPI.WorldStorage.Response response = RelocalizationInformationRequest.GetRelocalizationInformation(m_worldStorageServer, uuids, modes, capabilities); if(response == null) { Debug.Log("ESTI ARF GetRelocalizationInformation : request response is null"); } relocInfo = response.RelocInfo.First(); //Only one uuid requested } else Loading @@ -408,7 +413,6 @@ public class WorldAnalysisARFoundation : MonoBehaviour, WorldAnalysisInterface /// Subscription not possible return InformationSubscriptionResult.NONE; } return CreateSubscriptionWithRelocalizationInformation(relocInfo, uuid, mode, callback, ref validity, out subscriptionUUID); } Loading
Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs +13 −2 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati /// <returns>geopose or not (does not check is solved)</returns> public bool AddTrackable(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { Debug.Log("GEO : Add Geosptial Trackable"); if (!geospatialSupported) return false; if (trackable.TrackableType != ETSI.ARF.OpenAPI.WorldStorage.TrackableType.GEOPOSE) Loading Loading @@ -113,19 +114,29 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati /// <param name="trackable"></param> public async void CreateGeosptialAnchor(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { double[] values = new double[trackable.TrackablePayload.Length / sizeof(double)]; for (int i = 0; i < values.Length; i++) { values[i] = BitConverter.ToDouble(trackable.TrackablePayload, i * sizeof(double)); } if (geospatialSupported) { while (ARSession.state == ARSessionState.CheckingAvailability || ARSession.state == ARSessionState.None || ARSession.state == ARSessionState.SessionInitializing || m_arEarthManager.EarthState != EarthState.Enabled || m_arEarthManager.EarthTrackingState != TrackingState.Tracking) { Debug.Log("Geo : checking " + ARSession.state + " " + m_arEarthManager.EarthState + " " + m_arEarthManager.EarthTrackingState); await System.Threading.Tasks.Task.Delay(100); } if (m_arEarthManager.IsGeospatialModeSupported(GeospatialMode.Enabled) != FeatureSupported.Supported) { geospatialSupported = false; Debug.Log("Geo : not supported"); } else { double[] values = new double[trackable.TrackablePayload.Length / sizeof(double)]; values = new double[trackable.TrackablePayload.Length / sizeof(double)]; for (int i = 0; i < values.Length; i++) { Loading Loading @@ -164,7 +175,7 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } else { Debug.Log("ARCore Geospatial Anchor No correspondance for Local Anchor " + localId); //Debug.Log("ARCore Geospatial Anchor No correspondance for Local Anchor " + localId); continue; } Loading