Skip to main content
←API Reference ←NSDK ←NSDKVps2Session

assetTrackingData


Declaration​

func assetTrackingData(assetId: String? = nil) -> Vps2AssetTrackingData?

Summary​

Gets the pose of a VPS asset's origin in the device's AR tracking space.
The pose relates the asset's origin to the tracking space origin; it is
not relative to the current camera pose. See
Vps2AssetTrackingData/assetToTrackingTransform.
Data is only served while the asset is tracked; until then this returns
nil, so keep polling — 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/confidence reflects 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.

Returns​

The asset's tracking data, or nil while none is available:
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 nil while the device is not localized to any
asset.

Notice

Note: An asset published without geographic bounds — only legacy assets — is treated as always near the device, so it can be tracked and served from any distance.

Parameters​

NameTypeSummary
assetIdString?
The identifier of the asset, or nil for the asset
the device is currently localized to (see Vps2Localization/localizedAsset).