diff --git a/Runtime/Resources/ARFAnchorTrackingPrefab.prefab b/Runtime/Resources/ARFAnchorTrackingPrefab.prefab index 1c0ee738560530d29e294eefa33a506935afe7f0..e50e5ac9686854e11387355ba2d3bbdadc67f699 100644 --- a/Runtime/Resources/ARFAnchorTrackingPrefab.prefab +++ b/Runtime/Resources/ARFAnchorTrackingPrefab.prefab @@ -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 diff --git a/Runtime/Scripts/WorldAnalysisARFoundation.cs b/Runtime/Scripts/WorldAnalysisARFoundation.cs index b40662f80caee4c2e797584fb4121c2342ea7ab0..34925a2b6a8e50d09128bcf3c3479240bae7a522 100644 --- a/Runtime/Scripts/WorldAnalysisARFoundation.cs +++ b/Runtime/Scripts/WorldAnalysisARFoundation.cs @@ -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 @@ -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); } diff --git a/Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs b/Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs index bd8e03431180bc31bf83d1e52b374cb425d67c5a..6a8c0936e4ddaacd2496f852251a6e4ad66540b0 100644 --- a/Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs +++ b/Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs @@ -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) @@ -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++) { @@ -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; }