PositionalTrackingParameters Class Reference

Class containing a set of parameters for the positional tracking module initialization. More...

Attributes

Quaternion initialWorldRotation = Quaternion.Identity
 Rotation of the camera in the world frame when the camera is started. More...
 
Vector3 initialWorldPosition = Vector3.Zero
 Position of the camera in the world frame when the camera is started. More...
 
bool enableAreaMemory = true
 Whether the camera can remember its surroundings. More...
 
bool enablePoseSmothing = false
 Whether to enable smooth pose correction for small drift correction. More...
 
bool setFloorAsOrigin = false
 Initializes the tracking to be aligned with the floor plane to better position the camera in space. More...
 
bool setAsStatic = false
 Whether to define the camera as static. More...
 
bool enableIMUFusion = true
 Whether to enable the IMU fusion. More...
 
float depthMinRange = -1f
 Minimum depth used by the ZED SDK for positional tracking. More...
 
bool setGravityAsOrigin = true
 Whether to override 2 of the 3 components from initialWorldRotation using the IMU gravity. More...
 
string areaFilePath = ""
 Path of an area localization file that describes the surroundings (saved from a previous tracking session). More...
 
sl.POSITIONAL_TRACKING_MODE mode = sl.POSITIONAL_TRACKING_MODE.GEN_1
 Positional tracking mode used. More...
 

Detailed Description

Class containing a set of parameters for the positional tracking module initialization.

The default constructor sets all parameters to their default settings.

Note
Parameters can be user adjusted.

Variables

◆ initialWorldRotation

Quaternion initialWorldRotation = Quaternion.Identity

Rotation of the camera in the world frame when the camera is started.

◆ initialWorldPosition

Vector3 initialWorldPosition = Vector3.Zero

Position of the camera in the world frame when the camera is started.

◆ enableAreaMemory

bool enableAreaMemory = true

Whether the camera can remember its surroundings.

This helps correct positional tracking drift and can be helpful for positioning different cameras relative to one other in space.

Warning
This mode requires more resources to run, but greatly improves tracking accuracy.
We recommend leaving it on by default.

◆ enablePoseSmothing

bool enablePoseSmothing = false

Whether to enable smooth pose correction for small drift correction.

◆ setFloorAsOrigin

bool setFloorAsOrigin = false

Initializes the tracking to be aligned with the floor plane to better position the camera in space.

Note
This launches floor plane detection in the background until a suitable floor plane is found.
The tracking will start in sl.POSITIONAL_TRACKING_STATE.SEARCHING state.
Warning
This features does not work with sl.MODEL.ZED since it needs an IMU to classify the floor.
The camera needs to look at the floor during initialization for optimum results.

◆ setAsStatic

bool setAsStatic = false

Whether to define the camera as static.

If true, it will not move in the environment. This allows you to set its position using initialWorldPosition and initialWorldRotation.
All ZED SDK functionalities requiring positional tracking will be enabled without additional computation.
sl.Camera.GetPosition() will return the values set as initialWorldPosition and initialWorldRotation.

◆ enableIMUFusion

bool enableIMUFusion = true

Whether to enable the IMU fusion.

When set to false, only the optical odometry will be used.

Note
This setting has no impact on the tracking of a camera.
sl.MODEL.ZED does not have an IMU.

◆ depthMinRange

float depthMinRange = -1f

Minimum depth used by the ZED SDK for positional tracking.

It may be useful for example if any steady objects are in front of the camera and may perturb the positional tracking algorithm.
Default: -1 (no minimum depth)

◆ setGravityAsOrigin

bool setGravityAsOrigin = true

Whether to override 2 of the 3 components from initialWorldRotation using the IMU gravity.

Note
This parameter does nothing on sl.ZED.MODEL since it does not have an IMU.

◆ areaFilePath

string areaFilePath = ""

Path of an area localization file that describes the surroundings (saved from a previous tracking session).

Note
Loading an area file will start a search phase, during which the camera will try to position itself in the previously learned area.
Warning
The area file describes a specific location. If you are using an area file describing a different location, the tracking function will continuously search for a position and may not find a correct one.
The '.area' file can only be used with the same depth mode (sl.DEPTH_MODE) as the one used during area recording.

◆ mode

Positional tracking mode used.

Can be used to improve accuracy in some types of scene at the cost of longer runtime.