Tango项目Unity3d领域的学习场景不会更新姿势ADF和本地化数据 [英] Project Tango Unity3d Area Learning Scene does not update pose data for ADF and Localization

查看:342
本文介绍了Tango项目Unity3d领域的学习场景不会更新姿势ADF和本地化数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经花了上Unity3D SDK领域的学习场景几个小时试图找出如何加载ADF和而使用它开箱即用的本地化。然而,m_useADF设置为true,并确定该UUID是有效的,并传递给TangoApplication对象后,系统没有返回ADF的更新和的姿势信息本地化的部分。我的理论是,它们或者从未生产或沿管道到回调某处丢失。

I have spent a some hours on Unity3D SDK Area Learning Scene trying to figure out how to load ADF and localize while using it OOTB. However, after setting m_useADF to true and verifying that the UUID is valid and passed to the TangoApplication object the system is not returning updates for the ADF and Localized parts of the pose information. My theory is that they are either never produced or lost somewhere along the pipeline to the callback.

这是相应的code的第一部分:
            公共BOOL m_useADF = TRUE;

This is the first part of the corresponding code: public bool m_useADF = true;

        if(m_useADF)
            {
                // Query the full adf list.
                PoseProvider.RefreshADFList();
                // loading last recorded ADF
                string uuid = PoseProvider.GetLatestADFUUID().GetStringDataUUID();
                m_tangoApplication.InitProviders(uuid);
                Debug.Log ("HERE IS THE UUID: " + uuid);
            }

这是那里的ADF和重新定位数据都应报告,但他们永远不会更新。该控制器是正确注册为PoseListener和MotionTracking姿势时,该设备使用状态POSE_VALID四处移动数据正确更新。我还没有发现关于ADF不加载任何错误消息,但是,状态永远不会更新过去TANGO_POSE_INITIALIZING数据的同时自动进稿器和重新定位件。

This is where the ADF and Relocalization data should be reported but they are never updated. The controller is correctly registered as a PoseListener and the MotionTracking pose data is updated correctly when the device moves around with status POSE_VALID. I haven't detected any error messages regarding the ADF not loading, however, the status is never updated past TANGO_POSE_INITIALIZING for both the ADF and Relocalization pieces of data.

        // ADF
        GUI.Label( new Rect(Common.UI_LABEL_START_X, 
                            Common.UI_LABEL_START_Y + Common.UI_LABEL_OFFSET * 3, 
                            Common.UI_LABEL_SIZE_X , 
                            Common.UI_LABEL_SIZE_Y), "ADF1: <size=15>" + String.Format(Common.UX_TARGET_TO_BASE_FRAME,
                                                             TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_DEVICE,
                                                             TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_AREA_DESCRIPTION) + "</size>");

        GUI.Label( new Rect(Common.UI_LABEL_START_X, 
                            Common.UI_LABEL_START_Y + Common.UI_LABEL_OFFSET * 4, 
                            Common.UI_LABEL_SIZE_X , 
                            Common.UI_LABEL_SIZE_Y), "ADF2: <size=15>" + String.Format(Common.UX_STATUS,
                                                             m_status[1],
                                                             m_frameCount[1],
                                                             m_frameDeltaTime[1],
                                                             m_tangoPosition[1],
                                                             m_tangoRotation[1]) + "</size>");
        // RELOCALIZATION
        GUI.Label( new Rect(Common.UI_LABEL_START_X, 
                            Common.UI_LABEL_START_Y + Common.UI_LABEL_OFFSET * 5, 
                            Common.UI_LABEL_SIZE_X , 
                            Common.UI_LABEL_SIZE_Y), "RELOCALIZED1: <size=15>" + String.Format(Common.UX_TARGET_TO_BASE_FRAME,
                                                             TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_AREA_DESCRIPTION,
                                                             TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_START_OF_SERVICE) + "</size>");

        GUI.Label( new Rect(Common.UI_LABEL_START_X, 
                            Common.UI_LABEL_START_Y + Common.UI_LABEL_OFFSET * 6, 
                            Common.UI_LABEL_SIZE_X , 
                            Common.UI_LABEL_SIZE_Y), "RELOCALIZED2: <size=15>" + String.Format(Common.UX_STATUS,
                                                             m_status[2],
                                                             m_frameCount[2],
                                                             m_frameDeltaTime[2],
                                                             m_tangoPosition[2],
                                                             m_tangoRotation[2]) + "</size>");

有没有人遇到此之前,解决了呢?有谁知道这是一个已知的问题?

Has anybody faced this before and solved it? Does anybody know if this is a known issue?

Cristhopper

Cristhopper

推荐答案

我不知道这是有益的,但​​我的可能的知道发生了什么事情只在我经历当一回事移植样品C#。我还没有使用统一的SDK。

I don't know if this is helpful, but I might know what's going on only in that I experienced the same thing when porting the samples to C#. I haven't use the Unity SDK.

如果有一个支持广告的呈现类似TangoUtilities项目或功能,您引用的或已实施类似的东西,有一个在OnPoseAvailable执行引用渲染器的轨迹code:

If there is a similar TangoUtilities project or function that supports rendering of the AD, and you are referencing that or have implemented something similar, there is code in the OnPoseAvailable implementation that references the renderer's trajectory:

例如

        // Update the trajectory, model matrix, and view matrix, then
        // render the scene again
        if (updateRenderer && (mRenderer.Trajectory != null))

在我的版本上面,我加了&放大器;&安培; (mRendered.Trajectory!= NULL),因为前几个通行证,它仍然是空。

in my version above, I added the && (mRendered.Trajectory != null) because the first few passes, it is still null.

如果我还记得,这是导致无声故障,并且不再允许它的任何渲染。

If I recall, this was causing a silent failure, and ceased to allow rendering of any of it.

我认为这是值得分享,并希望它可能是您的解决方案。

I thought it was worth sharing, and hope it might be your solution.

这篇关于Tango项目Unity3d领域的学习场景不会更新姿势ADF和本地化数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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