技术世界跟踪性能受到资源限制的影响 [英] Technique World tracking performance is being affected by resource constraints

查看:31
本文介绍了技术世界跟踪性能受到资源限制的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在启用世界跟踪的情况下运行 ARKit 会话时,Xcode 控制台显示关于(我认为:降低)跟踪性能的日志消息,即使

  • AR Session 处于正常跟踪状态,

  • 我正在一间光线充足的办公室里使用该设备,那里有很多功能".检测,和

  • While running an ARKit session with world tracking enabled, the Xcode console shows log messages about (I presume: reduced) tracking performance, even though

    • The AR Session is in Normal tracking state,

    • I am using the device in a well-lit office room with plenty of "features" to detect, and

    • The device moves only subtly.

    TLDR: I want to understand what could be causing them, what impact they could have, and how to prevent them, or (re)act to them when they do occur—NB. not simply hide these errors.

    [Technique] World tracking performance is being affected by resource constraints [0]
    [Technique] World tracking performance is being affected by resource constraints [1]
    

    The Console app shows that these are coming from the library ARKit and fall in the logging category Technique. Although they sound like warnings, the Console app shows their type as errors.

    As expected while using world tracking, the Console app does show a lot of CoreMotion logs around the time of the errors, but those lines do not seem to contain any errors, warnings, or other info that helps me diagnose what's going on.

    The moment the errors show up in the log, there are no delegate callbacks, but eventually (anything between 5 seconds or 50 seconds) the screen will freeze with the callback session failed:

    Error Domain=com.apple.arkit.error Code=200 "World tracking failed." UserInfo={NSLocalizedDescription=World tracking failed., NSLocalizedFailureReason=World tracking cannot determine the device's position.}
    

    The ARKit source/documentation doesn't provide any hints on what "resource constraints" might have caused the inability to determine the device's position, it just reads:

    World tracking has encountered a fatal error.

    I've tried (without success) to stop the warnings from appearing by:

    • Resetting the session tracking: still errors,

    • Resetting the session with removal of all ARAnchors: still errors,

    • Disabling plane detection (once no longer needed): still errors.

    Pausing the AR Session silences the warnings (makes sense, since it means the device stops tracking its movement while paused), but when resuming the session, the warnings return.

    When closing the session and re-creating it (i.e. dismiss VC and recreate), while not having moved the camera (or changed lighting) the problem doesn't always re-occur.

    My best guess is that blinking TL-lights are the cause for the tracking performance warnings, given Apple's explanation how world tracking works:

    … visual-inertial odometry. This process combines information from the iOS device’s motion sensing hardware with computer vision analysis of the scene visible to the device’s camera. ARKit recognizes notable features in the scene image, tracks differences in the positions of those features across video frames, and compares that information with motion sensing data.

    (iPhone 6S, iOS 11 beta 4, no other apps running in the background)


    Questions:

    • What is the difference between [0] and [1]?

    • What can cause these errors?

    • What impact do they have while the ARSession hasn't failed (yet)? I'm assuming we'll see "jumpy" models as the world coordinates supplied by the frame updates aren't accurate—NB. after resetting/stopping ARAnchor tracking the errors still occurred.

    • Will we know if the AR session is about to fail, or will it be unexpected? (Again, the ARSession doesn't fail immediately after the tracking state changes to "limited")

    • Is there some way to deal with this, e.g. freeing up some of these mentioned "resources"—or other ways to avoid running into these constraints?

    解决方案

    Only allowing Portrait Device Orientation resolved this error for me.

    这篇关于技术世界跟踪性能受到资源限制的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆