TrackingParameters Class Reference

Parameters for positional tracking initialization. More...

General Functions

 TrackingParameters (Transform init_pos=Transform(), bool _enable_memory=true, bool _enable_pose_smoothing=false, String _area_path=String(), bool _set_floor_as_origin=false, bool _enable_imu_fusion=true)
 Default constructor, set all parameters to their default and optimized values. More...
 
bool save (String filename)
 Saves the current set of parameters into a file. More...
 
bool load (String filename)
 Loads the values of the parameters contained in a file. More...
 

Attributes

Transform initial_world_transform
 
bool enable_spatial_memory
 
bool enable_pose_smoothing
 
bool set_floor_as_origin
 
String area_file_path
 
bool enable_imu_fusion
 

Detailed Description

Parameters for positional tracking initialization.

A default constructor is enabled and set to its default parameters.
You can customize it to fit your application and then save it to create a preset that can be loaded for further executions.

Note
Parameters can be user adjusted.

Constructor and Destructor

TrackingParameters ( Transform  init_pos = Transform(),
bool  _enable_memory = true,
bool  _enable_pose_smoothing = false,
String  _area_path = String(),
bool  _set_floor_as_origin = false,
bool  _enable_imu_fusion = true 
)
inline

Default constructor, set all parameters to their default and optimized values.

Functions

bool save ( String  filename)

Saves the current set of parameters into a file.

Parameters
filename: the path to the file in which the parameters will be stored.
Returns
true if the file was successfully saved, otherwise false.
bool load ( String  filename)

Loads the values of the parameters contained in a file.

Parameters
filename: the path to the file from which the parameters will be loaded.
Returns
true if the file was successfully loaded, otherwise false.

Variables

Transform initial_world_transform

Position of the camera in the world frame when camera is started. By default it should be identity.
Use this Transform to place the camera frame in the world frame.
default : Identity matrix

Note
The camera frame (defines the reference frame for the camera) is by default positioned at the world frame when tracking is started.
bool enable_spatial_memory

This mode enables the camera to learn and remember its surroundings. This helps correct positional tracking drift and position different cameras relative to each other in space.
default : true

Warning
: This mode requires few resources to run and greatly improves tracking accuracy. We recommend to leave it on by default.
bool enable_pose_smoothing

This mode enables smooth pose correction for small drift correction.
default : false

bool set_floor_as_origin

This mode initialize the tracking aligned with the floor plane to better position the camera in space
default : false

Note
: The floor plane detection is launched in the background until it is found. The tracking is in TRACKING_STATE_SEARCHING state.
Warning
: This features work best with the ZED-M since it needs an IMU to classify the floor. The ZED needs to look at the floor during the initialization for optimum results.
String area_file_path

Area localization file that describes the surroundings (previously saved).
default : (empty)

Note
Loading an area file will start a searching 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 (MODE) as the one used during area recording.
bool enable_imu_fusion

This setting allows you to enable or disable the IMU fusion. When set to false, only the optical odometry will be used.
default : true

Note
This setting has no impact on the tracking of a ZED camera, only the ZED Mini uses a built-in IMU.