getAssetTrackingData
Declaration
fun getAssetTrackingData(assetId: String? = null): Vps2AssetTrackingData?
Summary
Returns
The asset's tracking data, or null when it has none yet: its tracking is spinning up, limited, or lost, the device has not approached the asset, a localize request that may fetch it is still in flight, or assetId was null while the device is not localized to any asset.
Throws
NsdkInvalidArgumentStatusException— ifassetIdis empty or not a canonical lower-case UUID, or names an asset unknown to this session. While alocalizerequest is still fetching, an unknown id returnsnullinstead, since the fetch may bring it in.
Parameters
| Name | Type | Summary |
|---|---|---|
| assetId | String? | The identifier of the VPS map asset, or null (the default) for the asset the device is currently localized to — the [Vps2Localization.localizedAsset] of [getLatestLocalization]. |
Gets the pose and tracking confidence of a VPS asset's origin in the device's AR tracking space.
Call this regularly to place content authored in the asset's coordinate space: the pose is
refined as the device moves and VPS relocalizes. The pose relates the asset's origin to the
tracking space origin; it is not relative to the current camera pose.
Data is only served while the asset is tracked; until then this returns
null, so keeppolling — though an asset the device never approaches will not become tracked however long it
is polled. A pose can be served before the device has localized against the asset, at reduced
accuracy, and each localization against it refines the pose.
Vps2AssetTrackingData.trackingConfidencereflects how well the pose is known.Once tracked, an asset keeps being served while device tracking holds, including after the
device localizes in a different asset or moves away.
This is independent of the VPS2 tracking state, which describes the geolocation estimate: an
asset with no georeference serves tracking data while the tracking state stays coarse.
An asset the portal published without geographic bounds — only legacy assets — is treated
as always near the device, so it can be tracked and served from any distance.
This function only accepts a VPS map asset ID, not a mesh or splat asset ID.