Structure containing a set of parameters for the positional tracking module initialization. More...
Functions | |
PositionalTrackingParameters (Transform init_position_=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, bool set_as_static_=false, float depth_min_range=-1.f, bool set_gravity_as_origin_=true, POSITIONAL_TRACKING_MODE mode=POSITIONAL_TRACKING_MODE::GEN_1) | |
Default constructor. More... | |
bool | save (String filename, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::LEGACY) const |
Saves the current set of parameters into a file to be reloaded with the load() method. More... | |
bool | load (String filename, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::AUTO) |
Loads a set of parameters from the values contained in a previously saved file. More... | |
bool | encode (String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string. More... | |
bool | decode (const String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) |
Fill the structure from the serialized json object contained in the input string. More... | |
bool | operator== (const PositionalTrackingParameters ¶m1) const |
bool | operator!= (const PositionalTrackingParameters ¶m1) const |
Attributes | |
Transform | initial_world_transform |
Position of the camera in the world frame when the camera is started. More... | |
bool | enable_area_memory |
Whether the camera can remember its surroundings. More... | |
bool | enable_pose_smoothing |
Whether to enable smooth pose correction for small drift correction. More... | |
bool | set_floor_as_origin |
Initializes the tracking to be aligned with the floor plane to better position the camera in space. More... | |
String | area_file_path |
Path of an area localization file that describes the surroundings (saved from a previous tracking session). More... | |
bool | enable_imu_fusion |
Whether to enable the IMU fusion. More... | |
bool | set_as_static |
Whether to define the camera as static. More... | |
float | depth_min_range |
Minimum depth used by the ZED SDK for positional tracking. More... | |
bool | set_gravity_as_origin |
Whether to override 2 of the 3 rotations from initial_world_transform using the IMU gravity. More... | |
POSITIONAL_TRACKING_MODE | mode |
Positional tracking mode used. More... | |
bool | enable_light_computation_mode = false |
Should enable light computation mode. More... | |
Structure containing a set of parameters for the positional tracking module initialization.
PositionalTrackingParameters | ( | Transform | init_position_ = 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 , |
||
bool | set_as_static_ = false , |
||
float | depth_min_range = -1.f , |
||
bool | set_gravity_as_origin_ = true , |
||
POSITIONAL_TRACKING_MODE | mode = POSITIONAL_TRACKING_MODE::GEN_1 |
||
) |
Default constructor.
Sets all parameters to their default and optimized values.
bool save | ( | String | filename, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::LEGACY |
||
) | const |
Saves the current set of parameters into a file to be reloaded with the load() method.
filename | : Name of the file which will be created to store the parameters (extension '.yml' will be added if not set). |
bool load | ( | String | filename, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::AUTO |
||
) |
Loads a set of parameters from the values contained in a previously saved file.
filename | : Path to the file from which the parameters will be loaded (extension '.yml' will be added at the end of the filename if not detected). |
bool encode | ( | String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) | const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string.
serialized_content | output string containing the JSON Object |
format | serialization format, default is JSON |
bool decode | ( | const String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) |
Fill the structure from the serialized json object contained in the input string.
serialized_content | input string containing the JSON Object |
format | serialization format, default is JSON |
bool operator== | ( | const PositionalTrackingParameters & | param1 | ) | const |
Comparison operator ==
PositionalTrackingParameters | to compare |
bool operator!= | ( | const PositionalTrackingParameters & | param1 | ) | const |
Comparison operator !=
PositionalTrackingParameters | to compare |
Transform initial_world_transform |
Position of the camera in the world frame when the camera is started.
Use this sl::Transform to place the camera frame in the world frame.
Default: Identity matrix.
bool enable_area_memory |
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.
Default: true
bool enable_pose_smoothing |
Whether to enable smooth pose correction for small drift correction.
Default: false
bool set_floor_as_origin |
Initializes the tracking to be aligned with the floor plane to better position the camera in space.
Default: false
String area_file_path |
Path of an area localization file that describes the surroundings (saved from a previous tracking session).
Default: (empty)
bool enable_imu_fusion |
Whether to enable the IMU fusion.
When set to false, only the optical odometry will be used.
Default: true
bool set_as_static |
Whether to define the camera as static.
If true, it will not move in the environment. This allows you to set its position using initial_world_transform.
All ZED SDK functionalities requiring positional tracking will be enabled without additional computation.
sl::Camera::getPosition() will return the value set as initial_world_transform.
Default: false
float depth_min_range |
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)
bool set_gravity_as_origin |
Whether to override 2 of the 3 rotations from initial_world_transform using the IMU gravity.
Default: true
Positional tracking mode used.
Can be used to improve accuracy in some types of scene at the cost of longer runtime.
Default: sl::POSITIONAL_TRACKING_MODE::GEN_1
bool enable_light_computation_mode = false |