美文网首页
Google Tango API系列(四)之What Are T

Google Tango API系列(四)之What Are T

作者: 60916fc63567 | 来源:发表于2016-12-29 16:07 被阅读89次

    What Are Tango Poses?

    As your device moves through 3D space, it calculates where it is (position) and how it's rotated (orientation) up to 100 times per second. A single instance of this combined calculation is called the device's pose. The pose is an essential concept when working with motion tracking, area learning, or depth perception.

    To calculate the poses, you must choose base and target frames of reference , which may use different coordinate systems. You can view a pose as the translation and rotation required to transform vertices from the target frame to the base frame.

    当您的设备移动通过3D空间时,它计算它的位置(位置)及其旋转(方向)高达每秒100次。 此组合计算的单个实例称为设备的姿势。 当使用运动跟踪,区域学习或深度感知时,姿势是一个基本概念。

    要计算姿势,您必须选择基准和目标参考系,这可能使用不同的坐标系。 您可以将姿势视为将顶点从目标帧转换为基本帧所需的平移和旋转。

    Here is a simplified version of aTango pose structin C:

    这是一个C:探戈构成结构的简化版本

    The two key components of a pose are:

    A quaternion that defines the rotation of the target frame with respect to the base frame.

    A 3D vector that defines the translation of the target frame with respect to the base frame.

    姿势的两个关键组成部分是:

    定义目标帧相对于基准帧的旋转的四元数。

    定义目标帧相对于基本帧的平移的3D向量。

    An actual pose struct contains other fields, such as a timestamp and a copy of the frame pair, as you'll see below.

    实际的姿势结构包含其他字段,如时间戳和帧对的副本,如下所示。

    Pose data

    You can request pose data in two ways:

    Request Method #1

    Pose Status

    TangoPoseData contains a state, denoted by the TangoPoseStatus Type enum, which provides information about the status of the pose estimation system. The available TangoPoseStatusType members are:

    TangoPoseData包含由TangoPoseStatus类型枚举表示的状态,其提供关于姿态估计系统的状态的信息。 可用的TangoPoseStatusType成员是:

    INITIALIZING: The motion tracking system is either starting or recovering from an invalid state, and the pose data should not be used.

    VALID: The system believes the poses being returned are valid and should be used.

    INVALID: The system has encountered difficulty of some kind, so pose estimations are likely incorrect.

    UNKNOWN: The system is in an unknown state.

    INITIALIZING:运动跟踪系统可以是启动或从无效状态中恢复,并且不应当被使用的姿态数据。

    VALID:系统认为正在返回的姿势是有效的,并应使用。

    INVALID:系统遇到某种困难,因此姿态估计可能不正确。

    UNKNOWN:系统处于未知状态。

    Figure 1: Tango Pose data lifecycle

    图1:探戈姿势数据生命周期

    The TANGO_POSE_INITIALIZING status code indicates that the Tango framework is initializing and pose data is not yet available. If you are using callbacks, you will receive only one pose update with the status code set to TANGO_POSE_INITIALIZING while the framework is initializing.

    After initialization finishes, poses are in the TANGO_POSE_VALID state. If you are using callbacks, you will receive updates as frequently as they are available.

    If the system encounters difficulty and enters the TANGO_POSE_INVALID state, recovery depends on your configuration during initialization. If config_enable_auto_recovery is set to True, the system immediately resets the motion tracking system and enters the TANGO_POSE_INITIALIZING state. If config_enable_auto_recovery is set to False, pose data remains in the TANGO_POSE_INVALID state and no updates are received until you call TangoService_resetMotionTracking().

    TANGO_POSE_INITIALIZING状态代码表示Tango框架正在初始化,并且姿势数据尚不可用。 如果您使用回调,则在框架正在初始化时,您将只收到一个状态代码设置为TANGO_POSE_INITIALIZING的姿势更新。

    初始化完成后,姿势处于TANGO_POSE_VALID状态。 如果您正在使用回调,您将收到更新的频率,因为他们可用。

    如果系统遇到困难并进入TANGO_POSE_INVALID状态,则恢复取决于初始化期间的配置。 如果config_enable_auto_recovery设置为True,系统立即重置运动跟踪系统并进入TANGO_POSE_INITIALIZING状态。 如果config_enable_auto_recovery设置为False,则姿势数据保持TANGO_POSE_INVALID状态,并且在调用TangoService_resetMotionTracking()之前不会接收更新。

    Using pose status


    Your application should react to the status being returned within the pose data. For example, wait until the pose data you are interested in becomes valid before starting interactions in your application. If the pose becomes invalid, pause interactions until after the system recovers. Depending on your application, what you do after the system recovers will vary. If you are using motion tracking alone, you can simply resume your application. If you are using area learning or ADFs, instruct your user to move around until the device can localize itself.

    您的应用程序应对姿势数据中返回的状态做出反应。 例如,等到您感兴趣的姿势数据在您的应用程序中开始交互之前变得有效。 如果姿势变得无效,请暂停交互,直到系统恢复。 根据您的应用程序,您在系统恢复后所做的操作将有所不同。 如果仅使用运动跟踪,则可以简单地恢复应用程序。 如果您使用区域学习或ADF,请指导您的用户移动,直到设备可以本地化。

    相关文章

      网友评论

          本文标题:Google Tango API系列(四)之What Are T

          本文链接:https://www.haomeiwen.com/subject/zjqpvttx.html