国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

什么是Tango姿勢

2019-11-09 14:18:48
字體:
來源:轉載
供稿:網友

What Are Tango Poses? 什么是Tango姿勢?

As your device moves through 3D space, it calculates where it is (position) andhow it’s rotated (orientation) up to 100 times per second. A single instance ofthis combined calculation is called the device’spose. The pose is anessential concept when working with motion tracking, area learning, or depthperception.

當您的設備移動通過3D空間時,它計算它的位置(位置)及其旋轉(方向)高達每秒100次。此組合計算的單個實例稱為設備的姿勢。當使用運動跟蹤,區域學習或深度感知時,姿勢是一個基本概念。

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

要計算姿勢,您必須選擇基準和目標參考系,這可能使用不同的坐標系。您可以將姿勢視為將頂點從目標幀轉換為基本幀所需的平移和旋轉。

Here is a simplified version of a Tango pose structin C:

這里是一個簡化版本的探戈姿勢結構在C:

struct PoseData { double orientation[4]; double translation[3]; }

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 ofthe frame pair, as you’ll see below.

實際的姿態結構包含其他字段,如時間戳和幀對的副本,如下所示。

Note: The examples on this page use the C API, but function calls and datastructures are similar for java. In Unity, there are PRefabs which handle a lotof these details for you. 注意:此頁面上的示例使用C API,但對于Java,函數調用和數據結構類似。在Unity中,有預處理為你處理很多這些細節。 Pose data 姿勢數據

You can request pose data in two ways: 您可以通過兩種方式請求姿勢數據: Request Method #1 請求方法#1

Poll for poses using TangoService_getPoseAtTime().This returns the pose closest to a given timestamp from the base to the targetframe. Here is the code for this function in the C API:

使用TangoService_getPoseAtTime()調查姿勢。這將返回最接近給定時間戳的從基址到目標幀的姿態。這里是C API中此函數的代碼:

TangoErrorType TangoService_getPoseAtTime( double timestamp, TangoCoordinateFramePair frame_pair, TangoPoseData* pose);

The TangoCoordinateFramePairstruct specifies the base frame and the target frame.

TangoCoordinateFramePair結構指定基本幀和目標幀。

Note: If you are making an augmented reality app, we recommend that you useTangoService_getPoseAtTime() orTangoSupport_getPoseAtTime() because, in addition to polling for poses, they allow you to align the pose timestamps with the video frames.

注意:如果您正在制作增強現實應用程序,我們建議您使用TangoService_getPoseAtTime()或TangoSupport_getPoseAtTime(),因為除了輪詢姿勢,他們允許您將姿勢時間戳與視頻幀對齊。

The following code gets a pose of the device frame with respect to the start-of-service frame:

以下代碼獲取設備幀相對于服務啟動幀的姿態:

TangoPoseData pose_start_service_T_device; TangoCoordinateFramePair frame_pair; frame_pair.base = TANGO_COORDINATE_FRAME_START_OF_SERVICE; frame_pair.target = TANGO_COORDINATE_FRAME_DEVICE; TangoService_getPoseAtTime( timestamp, frame_pair, &pose_start_service_T_device);

In this example, including the names of the base and target frames in the posevariable name makes the name more descriptive: 在此示例中,在姿勢變量名稱中包括基準和目標框架的名稱使名稱更具描述性:

TangoPoseData pose_start_service_T_device;

Request Method #2 請求方法#2

Receive pose updates as they become available. To do so,attach an onPoseAvailable() callback toTangoService_connectOnPoseAvailable().This sample is from ourhello_motion_trackingexample project and can be found in thetango_handler.cc file:

接收姿勢更新,因為它們變得可用。為此,請將onPoseAvailable()回調附加到TangoService_connectOnPoseAvailable()。這個示例來自我們的hello_motion_tracking示例項目,可以在tango_handler.cc文件中找到:

TangoCoordinateFramePair pair; pair.base = TANGO_COORDINATE_FRAME_START_OF_SERVICE; pair.target = TANGO_COORDINATE_FRAME_DEVICE; if (TangoService_connectOnPoseAvailable(1, &pair, onPoseAvailable) != TANGO_SUCCESS) { LOGE(“TangoHandler::ConnectTango, connectOnPoseAvailable error.”); std::exit(EXIT_SUCCESS);

In both cases, you receive a TangoPoseData struct:

在這兩種情況下,您都會收到一個TangoPoseData結構:

typedef struct TangoPoseData { int version; double timestamp; // In milliseconds double orientation[4]; // As a quaternion double translation[3]; // In meters TangoPoseStatusType status_code; TangoCoordinateFramePair frame; int confidence; // Currently unused float accuracy; // Currently unused } TangoPoseData;

Pose status 姿勢狀態

TangoPoseData contains a state, denoted by theTangoPoseStatusTypeenum, which provides information about the status of the pose estimationsystem. The available TangoPoseStatusType members are:

TangoPoseData包含由TangoPoseStatusType枚舉指示的狀態,其提供關于姿態估計系統的狀態的信息??捎玫腡angoPoseStatusType成員是:

typedef enum { TANGO_POSE_INITIALIZING = 0, TANGO_POSE_VALID, TANGO_POSE_INVALID, TANGO_POSE_UNKNOWN } TangoPoseStatusType;

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

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

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

UNKNOWN: The system is in an unknown state.

INITIALIZING:運動跟蹤系統正在啟動或從無效狀態恢復,并且不應使用姿態數據。 VALID:系統認為返回的姿勢有效,應該使用。 INVALID:系統遇到某種困難,因此姿態估計可能不正確。 UNKNOWN:系統處于未知狀態。

Lifecycle of pose status 姿勢狀態的生命周期 Figure 1: Tango Pose data lifecycle 圖1:探戈姿勢數據生命周期

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

TANGO_POSE_INITIALIZING狀態代碼表示Tango框架正在初始化,并且姿勢數據尚不可用。如果您使用回調,則在框架正在初始化時,您將只收到一個狀態代碼設置為TANGO_POSE_INITIALIZING的姿勢更新。

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

初始化完成后,姿勢處于TANGO_POSE_VALID狀態。如果您正在使用回調,您將收到更新的頻率,因為他們可用。

If the system encounters difficulty and enters the TANGO_POSE_INVALID state,recovery depends on your configuration during initialization. Ifconfig_enable_auto_recovery is set toTrue, the system immediately resetsthe motion tracking system and enters theTANGO_POSE_INITIALIZING state. Ifconfig_enable_auto_recovery is set toFalse, pose data remains in theTANGO_POSE_INVALID state and no updates are received until you callTangoService_resetMotionTracking().

如果系統遇到困難并進入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 posedata. For example, wait until the pose data you are interested in becomes validbefore starting interactions in your application. If the pose becomes invalid,pause interactions until after the system recovers. Depending on yourapplication, what you do after the system recovers will vary. If you are usingmotion tracking alone, you can simply resume your application. If you are usingarea learning or ADFs, instruct your user to move around until the device canlocalize itself. 您的應用程序應對姿勢數據中返回的狀態做出反應。例如,等到您感興趣的姿勢數據在您的應用程序中開始交互之前變得有效。如果姿勢無效,請暫停交互,直到系統恢復。根據您的應用程序,您在系統恢復后執行的操作將有所不同。如果您僅使用運動跟蹤,則可以簡單地恢復應用程序。如果您使用區域學習或ADF,請指導您的用戶移動,直到設備可以本地化。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 安龙县| 商城县| 兰州市| 黄石市| 乐山市| 建瓯市| 青川县| 许昌市| 都安| 牟定县| 临沂市| 丹寨县| 石棉县| 瓮安县| 碌曲县| 大理市| 怀集县| 西和县| 叙永县| 来安县| 胶州市| 鸡东县| 高平市| 江城| 杨浦区| 宁陵县| 若尔盖县| 通许县| 礼泉县| 灌云县| 吴江市| 张掖市| 宁蒗| 海丰县| 尚志市| 酉阳| 肥西县| 雅江县| 河西区| 常宁市| 华蓥市|