Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 04e6449

Browse files
committed
Merge branch 'develop'
2 parents 495cd30 + fb494a9 commit 04e6449

9 files changed

Lines changed: 10796 additions & 10652 deletions
-2 KB
Binary file not shown.
0 Bytes
Binary file not shown.

Assets/SolAR/Demos/Sample/Scenes/SolARHololens2SampleScene.unity

Lines changed: 503 additions & 10624 deletions
Large diffs are not rendered by default.

Assets/SolAR/Prefab/SolARCloudHololens2SampleUi.prefab

Lines changed: 10271 additions & 0 deletions
Large diffs are not rendered by default.

Assets/SolAR/Prefab/SolARCloudHololens2SampleUi.prefab.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/SolAR/Scripts/SolARMappingAndRelocalizationGrpcProxyManager.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,6 @@ private byte[] convertToPNG(ImageLayout imLayout,
144144
public void SetFrame(int sensorId, ulong timestamp, ImageLayout imLayout,
145145
uint imWidth, uint imHeight, byte[] imData, double[] pose, ImageCompression imageCompression)
146146
{
147-
148-
// System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
149-
// stopWatch.Start();
150-
// byte[] imDataPng = encodeToPNG(imWidth, imHeight, imLayout, imData);
151-
// byte[] imDataPng = convertToPNG(imLayout, imWidth, imHeight, imData);
152-
byte[] imDataPng = imData;
153-
// stopWatch.Stop();
154-
// manager.SendMessage("encodeToPNG duration: " + stopWatch.ElapsedMilliseconds + "(" + imDataPng.Length + " bytes)");
155-
156-
157147
frame = new Frame
158148
{
159149
SensorId = sensorId,
@@ -163,8 +153,7 @@ public void SetFrame(int sensorId, ulong timestamp, ImageLayout imLayout,
163153
Layout = imLayout,
164154
Width = imWidth,
165155
Height = imHeight,
166-
Data = ByteString.CopyFrom(imDataPng),
167-
// Data = UnsafeByteOperations.UnsafeWrap(imDataPng),
156+
Data = ByteString.CopyFrom(imData),
168157
ImageCompression = imageCompression
169158
},
170159
Pose = new Matrix4x4

Assets/SolAR/Scripts/SolArCloudHololens2.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private void NotifyOnReset()
334334
=> OnReset?.Invoke();
335335

336336
#if ENABLE_WINMD_SUPPORT
337-
SpatialCoordinateSystem origin;
337+
SpatialCoordinateSystem spatialCoordinateSystem;
338338
#endif
339339

340340
SolArCloudHololens2()
@@ -386,11 +386,8 @@ void Start()
386386

387387
#if ENABLE_WINMD_SUPPORT
388388

389-
origin = PerceptionInterop.GetSceneCoordinateSystem(UnityEngine.Pose.identity) as SpatialCoordinateSystem;
390-
System.Numerics.Matrix4x4? m = origin.TryGetTransformTo(origin);
391-
392-
// IntPtr ptr = Marshal.GetIUnknownForObject(origin);
393-
// researchMode.SetSpatialCoordinateSystem(ptr);
389+
spatialCoordinateSystem = PerceptionInterop.GetSceneCoordinateSystem(UnityEngine.Pose.identity) as SpatialCoordinateSystem;
390+
researchMode.SetSpatialCoordinateSystem(spatialCoordinateSystem);
394391

395392
if ( enabledSensors[Hl2SensorType.PV] )
396393
{
@@ -419,7 +416,6 @@ void Start()
419416

420417
researchMode.Init();
421418

422-
researchMode.SetSpatialCoordinateSystem(origin);
423419
#endif
424420

425421
if (solarScene == null)
@@ -729,7 +725,7 @@ SolARRpc.SolARMappingAndRelocalizationGrpcProxyManager.FrameSender relocAndMappi
729725
byte[] vclBufferData = null;
730726

731727
#if ENABLE_WINMD_SUPPORT
732-
vclBufferData = researchMode.GetVlcData(sensorType, out ts, out cam2WorldTransform, out _fx, out _fy, out _pixelBufferSize, out _width, out _height, /* flip = */ advancedGrpcSettings.imageCompression != SolARRpc.ImageCompression.None, origin /* PerceptionInterop.GetSceneCoordinateSystem(UnityEngine.Pose.identity) as SpatialCoordinateSystem*/);
728+
vclBufferData = researchMode.GetVlcData(sensorType, out ts, out cam2WorldTransform, out _fx, out _fy, out _pixelBufferSize, out _width, out _height, /* flip = */ advancedGrpcSettings.imageCompression != SolARRpc.ImageCompression.None);
733729
#endif
734730
if (vclBufferData != null)
735731
{

ProjectSettings/ProjectSettings.asset

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ PlayerSettings:
128128
16:10: 1
129129
16:9: 1
130130
Others: 1
131-
bundleVersion: 0.6.0
131+
bundleVersion: 0.7.0
132132
preloadedAssets:
133133
- {fileID: 0}
134134
- {fileID: 0}
@@ -280,6 +280,8 @@ PlayerSettings:
280280
- {fileID: 0}
281281
- {fileID: 0}
282282
- {fileID: 0}
283+
- {fileID: 0}
284+
- {fileID: 0}
283285
- {fileID: 8098013011867456620, guid: 892250fbfc1442f49a66d62b6c348e31, type: 2}
284286
- {fileID: 2256912601668067897, guid: bc86b981421586743bee1b33317fbc8a, type: 2}
285287
- {fileID: 0}
@@ -773,7 +775,7 @@ PlayerSettings:
773775
m_RenderingPath: 1
774776
m_MobileRenderingPath: 1
775777
metroPackageName: SolARDemo
776-
metroPackageVersion: 0.6.0.0
778+
metroPackageVersion: 0.7.0.0
777779
metroCertificatePath: Assets\WSATestCertificate.pfx
778780
metroCertificatePassword:
779781
metroCertificateSubject: DefaultCompany
@@ -794,7 +796,7 @@ PlayerSettings:
794796
2228424: Assets/SolAR/Demos/Objects/solarLogo_620x620.png
795797
2293860: Assets/SolAR/Demos/Objects/solarLogo_310x150.png
796798
2293960: Assets/SolAR/Demos/Objects/solarLogo_620x300.png
797-
metroTileShortName: SolARHololens2
799+
metroTileShortName: DevSolARHololens2
798800
metroTileShowName: 0
799801
metroMediumTileShowName: 0
800802
metroLargeTileShowName: 0
@@ -820,9 +822,6 @@ PlayerSettings:
820822
PrivateNetworkClientServer: True
821823
InternetClientServer: True
822824
VideosLibrary: False
823-
Objects3D: False
824-
Proximity: False
825-
RemoteSystem: False
826825
BlockedChatMessages: False
827826
PhoneCall: False
828827
UserDataTasks: False
@@ -843,10 +842,9 @@ PlayerSettings:
843842
PointOfService: False
844843
RecordedCallsFolder: False
845844
Contacts: False
846-
InternetClient: True
845+
Proximity: False
847846
CodeGeneration: False
848847
BackgroundMediaPlayback: False
849-
EnterpriseAuthentication: False
850848
metroTargetDeviceFamilies:
851849
Desktop: False
852850
Holographic: True

RELEASE-NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
# v0.7.0
4+
* Change sharing of SpatialCoordinateSystem object between Unity and native plugin so that it works with PV camera as well.
5+
* Make a prefab for the simple GUI.
6+
37
## v0.6.0
48
* Fix accuracy issues due the use of different coordinate system origin between Unity application and native plugin: the origin used in Unity is now shared between the two.
59
* Fix pose errors due to wrong computation for the correction of the pose received from SolAR.

0 commit comments

Comments
 (0)