PositionalTrackingParameters Class Reference

Parameters for positional tracking initialization. More...

Functions

def __cinit__ (self, _init_pos=Transform(), _enable_memory=True, _enable_pose_smoothing=False, _area_path=None, _set_floor_as_origin=False, _enable_imu_fusion=True, _set_as_static=False)
 Constructor. More...
 
def save (self, str filename)
 Saves the current set of parameters into a file. More...
 
def load (self, str filename)
 Loads the values of the parameters contained in a file. More...
 
def initial_world_transform (self, init_pos=Transform())
 Gets the position of the camera in the world frame when camera is started. More...
 
def set_initial_world_transform (self, Transform value)
  Set the position of the camera in the world frame when camera is started. More...
 
def enable_area_memory (self)
  This mode enables the camera to learn and remember its surroundings. More...
 
def enable_pose_smoothing (self)
 This mode enables smooth pose correction for small drift correction. More...
 
def set_floor_as_origin (self)
 This mode initializes the tracking aligned with the floor plane to better position the camera in space  . More...
 
def enable_imu_fusion (self)
 This setting allows you to enable or disable the IMU fusion. More...
 
def area_file_path (self)
 Area localization file that describes the surroundings (previously saved). More...
 
def set_as_static (self)
 This setting allows you define the camera as static. More...
 

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.

Functions

◆ __cinit__()

def __cinit__ (   self,
  _init_pos = Transform(),
  _enable_memory = True,
  _enable_pose_smoothing = False,
  _area_path = None,
  _set_floor_as_origin = False,
  _enable_imu_fusion = True,
  _set_as_static = False 
)

Constructor.

 

Parameters
_init_pos: chosen initial camera position in the world frame (Transform)  
_enable_memory: activates enable_memory  
_enable_pose_smoothing: activates enable_pose_smoothing  
_area_path: chosen area_path  
_set_floor_as_origin: activates set_floor_as_origin  
_enable_imu_fusion: activates enable_imu_fusion  
_set_as_static: activates set_as_static

 

 params = sl.PositionalTrackingParameters(init_pos=Transform(), _enable_pose_smoothing=True)
 

◆ save()

def save (   self,
str  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.

◆ load()

def load (   self,
str  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.

◆ initial_world_transform()

def initial_world_transform (   self,
  init_pos = Transform() 
)

Gets the position of the camera in the world frame when camera is started.

By default it should be identity.

Parameters
init_pos: Transform to be returned, by default it creates one  
Returns
Position of the camera in the world frame when camera is started.  
Note
The camera frame (defines the reference frame for the camera) is by default positioned at the world frame when tracking is started.

◆ set_initial_world_transform()

def set_initial_world_transform (   self,
Transform  value 
)

 Set the position of the camera in the world frame when camera is started.

 

Parameters
value: Transform input

◆ enable_area_memory()

def enable_area_memory (   self)

 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.

◆ enable_pose_smoothing()

def enable_pose_smoothing (   self)

This mode enables smooth pose correction for small drift correction.

 default : false

◆ set_floor_as_origin()

def set_floor_as_origin (   self)

This mode initializes the tracking aligned with the floor plane to better position the camera in space  .

Note
The floor plane detection is launched in the background until it is found. The tracking is in SEARCHING state.  
Warning
This feature works 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.

◆ enable_imu_fusion()

def enable_imu_fusion (   self)

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.

◆ area_file_path()

def area_file_path (   self)

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.

◆ set_as_static()

def set_as_static (   self)

This setting allows you define the camera as static.

If true, it will not move in the environment. This allows you to set its position using the initial world transform. All SDK functionalities requiring positional tracking will be enabled. Camera.get_position() will return the value set as initial world transform for the PATH, and identify as the POSE.