Skip to main content
API Reference SwiftyNsdk

NsdkDeviceMappingSession

A session for creating VPS maps from AR data on the local device....

Declaration

final class NsdkDeviceMappingSession

Summary

A session for creating VPS maps from AR data on the local device. The device mapping feature provides capabilities for locally building persistent maps that can be used for Visual Positioning System (VPS) localization. These maps capture the visual features and spatial structure of an environment.


Methods

NameTypeSummary
configurevoid
Configures the session with the specified settings.
- Attention: This method must be called while the session is stopped,
or else configuration will fail. In that case, while this function returns without
throwing, configuration will still fail asynchronously. Use featureStatus()
to check that configuration has not failed.
- Parameter config: An object that defines this session's behavior.
Only settings that differ from the defaults will be applied.
- Throws: NsdkError.invalidArgument if the configuration is invalid.
Check NSDK's C logs for more information.
featureStatusNsdkFeatureStatus
Reports the current status of the mapping session.
Check this periodically to see if any errors have occurred with processes running
inside this feature. Once an error has been flagged, it will remain flagged until the
culprit process has been run again and completed successfully.
- Returns: A flag indicating the current status of the mapping session.
startvoid
Starts the mapping session and initializes required processes.
Downloads the mapping algorithm model and prepares the session for mapping operations.
Does not begin map building; call startMapping() to start building a map.
startMappingvoid
Begin a mapping sequence.
This begins building an on-device map that can be used for VPS. Map data is accumulated
in NsdkMapStorage while mapping is running. Poll NsdkMapStorage.mapUpdate()
periodically to retrieve incremental map updates, or call NsdkMapStorage.mapData()
after mapping completes to get the full map.
- Attention: This method must be called after start() and before stop().
stopvoid
Stop all mapping processes.
- Note: If mapping is in progress, this will stop mapping.
stopMappingvoid
Stop the current mapping sequence.
This stops adding new frames to the current on-device VPS Map.

Nested Types

Structs

NameTypeSummary
ConfigurationConfiguration
Configuration settings for the mapping process.
This structure defines various parameters that control how the mapping algorithm
behaves during map creation, including feature detection, tracking edges, and
node splitting criteria.

Relationships

conforms to: NsdkFeatureSession