ARKit 将 WorldTrackingConfiguration 设置为 GravityAndHeading 会产生错误 [英] ARKit setting WorldTrackingConfiguration to gravityAndHeading produces error

查看:31
本文介绍了ARKit 将 WorldTrackingConfiguration 设置为 GravityAndHeading 会产生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 ARWorldTrackingConfiguration.worldAlignment 配置中使用 .gravityAndHeading.但是,我不断收到此错误:

<块引用>

设备方向错误:Error Domain=CMErrorDomain Code=102 "(null)"2018-03-01 20:08:25.218445+0000 App[759:84092] [Session] Session (0x10ba12ce0):确实失败,错误:Error Domain=com.apple.arkit.error Code=102所需的传感器失败."UserInfo={NSLocalizedFailureReason=传感器未能提供所需的输入., NSUnderlyingError=0x1c0850740 {Error Domain=CMErrorDomain Code=102 "(null)"}, NSLocalizedRecoverySuggestion=确保应用程序具有所需的隐私设置., NSLocalizedDescription=Required传感器故障.}会话失败.更改 worldAlignment 属性.

文档说要确保 Info.plist 包含相关的隐私要求 - 我已经添加了摄像头、位置、动作等,但无济于事.

有人遇到过相同情况/找到解决方案吗?

我使用这个特定设置是因为我需要将节点映射到物理世界,而不仅仅是用户的相对位置.

解决方案

您是否已将这些键添加到您的 info.plist 中?

基于其他研究,例如

I am trying to use the .gravityAndHeading on my ARWorldTrackingConfiguration.worldAlignment configuration. However, I keep getting this error:

Device orientation error: Error Domain=CMErrorDomain Code=102 "(null)" 2018-03-01 20:08:25.218445+0000 App[759:84092] [Session] Session (0x10ba12ce0): did fail with error: Error Domain=com.apple.arkit.error Code=102 "Required sensor failed." UserInfo={NSLocalizedFailureReason=A sensor failed to deliver the required input., NSUnderlyingError=0x1c0850740 {Error Domain=CMErrorDomain Code=102 "(null)"}, NSLocalizedRecoverySuggestion=Make sure that the application has the required privacy settings., NSLocalizedDescription=Required sensor failed.} Session failed. Changing worldAlignment property.

The docs said to ensure that Info.plist contains the relevant privacy requirements - I've added camera, location, motion etc. but to no avail.

Anyone experienced the same/worked out a solution?

I am using this specific setting because I need to map nodes to the physical world, not just to the relative position of the user.

解决方案

Have you added these keys to your info.plist?

Based on other resesarch e.g. What Does Error Code 102 Mean it seems that the following may be applicable to your situation:

CMErrorTrueNorthNotAvailable

From the post above one StackOverFlow user seems to have solved the issue by changing the following settings on their device:

Settings > Privacy > Location Services > System Services > Compass Calibration:

这篇关于ARKit 将 WorldTrackingConfiguration 设置为 GravityAndHeading 会产生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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