We have an app with some interactive AR elements, and at some point we display some text in full screen without leaving the AR World (and tracking is still running in the background). Is there a way to pause the tracking while we are in displaying these full screen text content ? Without closing the entire world.
I am thinking about momentarely disabling our tracker (Trackable2DObject Object), would that do the trick ? in other words, if there is no tracker activated, is the AR Engine still processing something ? is it still using important amount of CPU ?
Thanks, this seems to be exactly what I need, and I have indeed better perfmormance when I turn the camera off !
However on iOS (iPad Air 2), reenabling the camera causes my app to crash systematically. This is some element provided by XCode about the crash :
- MyApp`non-virtual thunk to wikitude::sdk_foundation::impl::PluginManager::cameraFrameProviderChanged(aramis::CameraFrameProvider&):
- EXC_BAD_ACCESS (code=1, adress=0x38)
I use the last version of the cordova plugin.
Thanks,
Amaury.
A
Amaury Belin
said
over 6 years ago
Same bug on Android.
It crashes systematically when this code is executed :
AR.hardware.camera.enabled = true;
Is there anything to do before (re)enabling camera ?
Thanks :-)
A
Andreas Fötschl
said
over 6 years ago
Hi Amaury,
Thanks for highlighting the issue. We put your finding on top of our issues list for the next release. We will keep you posted about the release date. Unfortunately there is no workaround for this issue in place.
Sorry for inconvenience.
Best regards, Andreas
A
Amaury Belin
said
over 6 years ago
Thanks Andreas !
In the meantime, the workaround I use to limit cpu usage when tracking is not necessary, is to destroy the current tracker :
World.tracker.destroy();
It is not as good as stopping the Camera feed as I still have 12% cpu usage on Ipad Air 2, but still it is a big improvement.
Bye,
Amaury.
A
Andreas Schacherbauer
said
over 6 years ago
Hi Amaury, We fixed the issue today and it will be part of our SDK 5.3 release later this week/early next week.
Best regards,
Andreas
A
Amaury Belin
said
over 6 years ago
Hi Andreas and thanks for integrating this fix in your last update :-)
I can now enable and disable Camera, but new bugs, causing the app to crash, are appearing on iOS (not tested yet in android).
First, if I load an AR World, track some objects, disable the camera, re-enable it, and track an object again, the app crashes (at the moment where the new object is about to be tracked). The error reported on XCode is :
#0 0x0027244e in wikitude::sdk_foundation::impl::CameraService::getPlatformSpecificConversionMatrix() () EXC_BAD_ACCESS
Second scenario, if I track an object, disable the camera when this object is being tracked, and reenable the camera, the app crash when the camera is reenabled. XCode report a "memory read failed".
Hope you can also fix these bugs. Tell me if you need more information about it.
Amaury.
A
Andreas Schacherbauer
said
over 6 years ago
Hi Amaury, thx for the report. We will investigate it right away.
Best regards,
Andreas
A
Andreas Schacherbauer
said
over 6 years ago
Hi Amaury, You can download a pre-release version of the iOS Architect SDK here. I was able to reproduce the issue locally but would appreciate if you could also test it and give me some feedback if it works for you as well.
Do you also use input plugins in your application?
Best regards,
Andreas
A
Amaury Belin
said
over 6 years ago
Hi Andreas,
I only develop with Cordova, and the file attached to your message is only for iOS native development I presume ?
Otherwise I would be happy to try this pre-release on my own and give you some feedback. And I don't use any input plugins, no.
Thanks for your reactivity !
Amaury.
A
Andreas Schacherbauer
said
over 6 years ago
Hi Amaury, It's easy to use the .framework withing Cordova. Simply look up the .framework content, locate the file 'WikitudeSDK', rename it to libWikitudePlugin.a and replace the existing libWikitudePlugin.a in your existing Cordova project (it might exist twice).
Best regards,
Andreas
A
Amaury Belin
said
over 6 years ago
Hi Andreas,
I tried to rename the WikitudeSDK file to libWikitudeSDK.a and place it (twice) in my cordova project. This way I get many "duplicat symbols" errors while trying to build the project.
Also the initial libWikitudeSDK.a is 88,7 Mo and the WikitudeSDK file (that I renamed to libWikitudeSDK.a) is 132,4 Mo.
If you repackage a proper cordova plugin, I could try again.
Thanks,
Amaury.
A
Amaury Belin
said
over 6 years ago
Hi Andreas,
Do you plan to release a new version of the SDK with a fix for this problem soon ? I can still do some tests if you send me a pre-release of the cordova plugin.
Amaury Belin