MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Can't run SharingTest scene from HoloToolkit-Test on emulator

Open dudziakl opened this issue 9 years ago • 12 comments

I compiled the sample and put to my HoloLens where is working fine, but when I tried to do the same on emulator I got "Found anchor, ready to export" message and later I have hundreds of "Failed to upload anchor, trying again..." messages. 2017-09-11_164553 I tried to debug ImportExportAnchorManager script and I found that problem is in ExportComplete method where there is a check for exportingAnchorBytes.Count. In my case it has always 310 bytes that that is too low for MinTrustworthySerializedAnchorDataSize (set to 100000). Anyone had similar issue? I didn't change anything on this project so it should work just OOTB. Am I missing something? I was able to repro this on another machine both with Unity 5.6.3p2, HoloToolkit 1.5.7 and emulator v10.0.14393.1358. I tried many rooms but it always is 310.

dudziakl avatar Sep 12 '17 12:09 dudziakl

In my case it has always 310 bytes that that is too low for MinTrustworthySerializedAnchorDataSize

Have you tried adding a room to the emulator to get more spatial mapping data?

StephenHodgson avatar Sep 12 '17 15:09 StephenHodgson

Yes I did. I tried also with default rooms. Always same number. I tried also to connect my HoloLens first so it should download some WorldAnchor from server, but result was the same. Have you check "SharingTest" test project on Unity 2017? Is it working there?

dudziakl avatar Sep 12 '17 15:09 dudziakl

I don't ever use the emulator, so I couldn't tell ya.

StephenHodgson avatar Sep 12 '17 15:09 StephenHodgson

Lucky you! I don't have another HoloLens for my own :)

dudziakl avatar Sep 12 '17 15:09 dudziakl

I updated the sharing services. See if that helps at all.

StephenHodgson avatar Sep 13 '17 02:09 StephenHodgson

Thanks Stephen! I had to re-create project as your changes were targeting Unity 2017.1. I did my test again and it is same story. It is working fine for HoloLens and not working for emulator. SharingTest project is different now and it is no longer using ImportExportAnchorManager script. Now Import/Export anchors is done in SharingWorldAnchorManager script. I managed do attached debugger and here is my result. 2017-09-13_142113 In green box there is successful try to save and export "AnchorVisual". That was fine. Anchor was saved and cached. In red box there is debug output about another anchor that was created but not exported. 2017-09-13_141942 As you can see upload data is too small to be exported. It is very similar to problem that I got with ImportExportAnchorManager script. Do you know what data is used to build anchors? I'm curious why it is so small.

dudziakl avatar Sep 13 '17 12:09 dudziakl

Great details on the issue!

Yeah I'm unsure as to why the anchors are so small on the emulator. My only suggestion (Shot in the dark) is to clear the spaces in the emulator (like you would the device) and see if that helps.

Seems like you're getting bad spatial perception data from the emulator.

StephenHodgson avatar Sep 13 '17 16:09 StephenHodgson

I loaded DefaultRoom.xef file and clear Space that should remove all anchors but still is not working. I noticed that my emulator has no Internet access. Is Internet needed for WorldAnchors? 2017-09-14_104050

dudziakl avatar Sep 14 '17 08:09 dudziakl

As long as you can reach the sharing service server locally in your pc, you should be good.

Even then, really the only thing I can think of is just making the minimum size smaller just for the emulator.

StephenHodgson avatar Sep 14 '17 11:09 StephenHodgson

I tried to set size smaller and it says that anchor was exported but devices can't recognize same room. I made new project for Unity 2017.2 beta 11 and HTK 2017.2 Dev branch, but results were same. On HoloLens device is working fine, on emulator I got "Anchor data was not valid" error. Good think about migration to 2017.2b11 was that debugger is working much better than 2017.1 release. I will try to find some more time to play with it, but for now I have no idea what else I can test. Any suggestions?

dudziakl avatar Sep 19 '17 08:09 dudziakl

I have the same error but also in the Hololens. In my case the Anchor size is 0. Any news about this bug?

fraspadafora avatar Feb 11 '18 17:02 fraspadafora

Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.

wiwei avatar Apr 11 '19 20:04 wiwei