本文介绍了检查区域是否已在加载的ADF中本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新

我找到了重新定位的行,但是设备没有本地化本身。加载ADF后,我总是得到状态码 POSE_INITIALIZING 。此外,Java中的重新本地化还没有工作。谁有同样的问题?
唯一有重新本地化工作的应用是Explorer和ADF Inspector,但我没有源代码。

I found the lines for re-localization, but de the device doesn't localize itself. I always get the status code POSE_INITIALIZING back after loading the ADF. Also the re-localization in the Java Area_Description_Example doesn't work. Anyone with the same problem?The only apps with working re-localozation are "Explorer" and "ADF Inspector", but I don't have the source code for it.

这里是我的第一个问题的解决方案,加载ADF后检查重新本地化的代码:

Here is the solution of my first question, the code to check re-localization after loading an ADF:

TangoPoseData lastFramePose = mTango.getPoseAtTime(mRgbTimestampGlThread,
                            FRAME_PAIR);
    if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {

           // Device is re-located!               

           // Update the camera pose from the renderer
           mRenderer.updateRenderCameraPose(lastFramePose);
           mCameraPoseTimestamp = lastFramePose.timestamp;
    } else {
           Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
    }

OLD:

在我的应用程序中,用户可以决定是启动新会话还是加载以前记录的ADF(区域描述文件)。我加载了ADF(adfUUID)并将其添加到Tango类对象(mTango)中,如下所示:

In my application the user can decide whether to start a new session or load an previously recorded ADF (area description file). I loaded the ADF (adfUUID) and added it to the Tango class object (mTango) like below:

TangoConfig config = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT);
config.putString(TangoConfig.KEY_STRING_AREADESCRIPTION, adfUUID);
mTango.setRuntimeConfig(config);

所以现在我的问题是,如何检查区域是否已本地化加载ADF?我希望有一个坐标参考框架到加载的ADF的服务开始,而不是我的新会话。
这是我在connectTango()函数中的设置:

So my question is now, how can I check if the area is localized with the loaded ADF? I want to have a coordinate reference frame to the start of service of the loaded ADF and not of my new session.This are my settings in my connectTango() function:

TangoConfig config = mTango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT);
config.putBoolean(TangoConfig.KEY_BOOLEAN_LOWLATENCYIMUINTEGRATION, true);
config.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true);
config.putBoolean(TangoConfig.KEY_BOOLEAN_LEARNINGMODE, true);
config.putBoolean(TangoConfig.KEY_BOOLEAN_COLORCAMERA, true);
mTango.connect(config);

我使用的fram对是:

And the fram pair I used is:

private static final TangoCoordinateFramePair FRAME_PAIR = new TangoCoordinateFramePair(
        TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION,
        TangoPoseData.COORDINATE_FRAME_DEVICE);


推荐答案

加载学习模式时ADF开启和关闭学习模式时加载ADF是好的。
目前他们正在使用不同的位置管道。
因此,第一个将比第二个更长时间本地化。
ADF Inspector用于加载ADF on with Learning
Tango Explorer应该重新本地化加载ADF on on Learning

Both "Loaded ADF on with Learning mode on" and "Load ADF on with Learning mode off" are Good.Currently They are using different location pipeline.So the first one will take much longer time localized than the second ones.ADF Inspector is for Load ADF on with Learning off"Tango Explorer should be Re-localized with with "Load ADF on with Learning on"

有关如何检查ADF本地化的问题,请参阅示例java代码:

for question about how to check the ADF localized please see the example java code:

  // Check for Device wrt ADF pose, Device wrt Start of Service pose,
                // Start of Service wrt ADF pose (This pose determines if the device
                // is relocalized or not).
                if (pose.baseFrame == TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION
                        && pose.targetFrame == TangoPoseData
                        .COORDINATE_FRAME_START_OF_SERVICE) {
                    if (pose.statusCode == TangoPoseData.POSE_VALID) {
                        mIsRelocalized = true;
                    } else {
                        mIsRelocalized = false;
                    }

提供数据Ť第三个:

ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
    framePairs.add(new TangoCoordinateFramePair(
            TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
            TangoPoseData.COORDINATE_FRAME_DEVICE));
    framePairs.add(new TangoCoordinateFramePair(
            TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION,
            TangoPoseData.COORDINATE_FRAME_DEVICE));
    framePairs.add(new TangoCoordinateFramePair(
            TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION,
            TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE));

这篇关于检查区域是否已在加载的ADF中本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 16:36