InitLidarParameters Class Reference

Structure containing the options used to initialize the Lidar object. More...

Functions

 InitLidarParameters ()
 

Attributes

sl::InputType input
 Input type (stream, etc.). More...
 
LIDAR_MODE mode = LIDAR_MODE::AUTO
 Lidar mode (resolution and frequency).
Default: sl::LIDAR_MODE::AUTO. More...
 
float depth_minimum_distance = 0.0f
 Minimum distance for data.
Default: 0.0f (no limit) More...
 
float depth_maximum_distance = 0.0f
 Maximum distance for data.
Default: 0.0f (no limit) More...
 
sl::UNIT coordinate_units = sl::UNIT::METER
 Unit of spatial data.
Default: sl::UNIT::METER. More...
 
sl::COORDINATE_SYSTEM coordinate_system = sl::COORDINATE_SYSTEM::IMAGE
 Coordinate system for spatial data.
Default: sl::COORDINATE_SYSTEM::IMAGE. More...
 
bool svo_real_time_mode = false
 Defines if the Lidar object returns frames in real-time mode. More...
 
bool auto_recovery_on_config_change = true
 Enables automatic recovery when the sensor's configuration changes externally. More...
 
LIDAR_MULTICAST_MODE multicast_mode = LIDAR_MULTICAST_MODE::AUTO
 Multicast streaming mode. More...
 
std::string multicast_group
 Multicast group IP address. More...
 
CUdevice sdk_gpu_id
 NVIDIA graphics card to use. By default the Lidar class will not use the GPU currently, this can be enabled with the env variable ZED_SDK_LIDAR_CUDA_PROCESSING.
. More...
 
CUcontext sdk_cuda_ctx
 CUcontext to be used. More...
 
int sdk_verbose = 1
 Set the verbosity level of the SDK. More...
 
String sdk_verbose_log_file
 File path to store the Lidar SDK logs (if sdk_verbose is enabled). More...
 

Detailed Description

Structure containing the options used to initialize the Lidar object.

Constructor and Destructor

◆ InitLidarParameters()

InitLidarParameters ( )
inline

Variables

◆ input

Input type (stream, etc.).

◆ mode

Lidar mode (resolution and frequency).
Default: sl::LIDAR_MODE::AUTO.

◆ depth_minimum_distance

float depth_minimum_distance = 0.0f

Minimum distance for data.
Default: 0.0f (no limit)

◆ depth_maximum_distance

float depth_maximum_distance = 0.0f

Maximum distance for data.
Default: 0.0f (no limit)

◆ coordinate_units

sl::UNIT coordinate_units = sl::UNIT::METER

Unit of spatial data.
Default: sl::UNIT::METER.

◆ coordinate_system

Coordinate system for spatial data.
Default: sl::COORDINATE_SYSTEM::IMAGE.

◆ svo_real_time_mode

bool svo_real_time_mode = false

Defines if the Lidar object returns frames in real-time mode.

When playing back an OSF file, each call to Lidar::grab() will extract a new frame and use it.
However, it ignores the real capture rate of the data saved in the OSF file.
Enabling this parameter will bring the SDK closer to a real simulation when playing back a file by using the frames' timestamps.
Default: false

Note
Lidar::grab() will return an error when trying to play too fast, and frames will be dropped when playing too slowly.

◆ auto_recovery_on_config_change

bool auto_recovery_on_config_change = true

Enables automatic recovery when the sensor's configuration changes externally.

When another client changes the sensor's configuration (resolution, FPS, multicast settings, etc.) while this client is streaming, the SDK can automatically detect this and reconnect.
If enabled (default), grab() will return ERROR_CODE::SENSOR_CONFIGURATION_CHANGED once after successful recovery, then resume normal operation.
If disabled, grab() will return ERROR_CODE::SENSOR_CONFIGURATION_CHANGED and enter failure mode. Subsequent calls to grab() will fail until the Lidar is closed and reopened.
Default: true

◆ multicast_mode

Multicast streaming mode.

Controls whether the sensor uses multicast (multiple clients can receive) or unicast (single client).
See LIDAR_MULTICAST_MODE for detailed behavior of each mode.
Default: sl::LIDAR_MULTICAST_MODE::AUTO

◆ multicast_group

std::string multicast_group

Multicast group IP address.

Optional multicast IP address in the range 239.0.0.0 - 239.255.255.255 (administratively scoped).
- If empty and multicast_mode is ON: SDK auto-selects 239.201.201.201
- If set and valid: used when enabling multicast
- If set and invalid: behavior depends on multicast_mode
- AUTO: returns ERROR_CODE::CONFIGURATION_FALLBACK, falls back to current sensor config
- ON: returns ERROR_CODE::INVALID_FUNCTION_PARAMETERS (hard fail)
Default: "" (empty)

◆ sdk_gpu_id

CUdevice sdk_gpu_id

NVIDIA graphics card to use. By default the Lidar class will not use the GPU currently, this can be enabled with the env variable ZED_SDK_LIDAR_CUDA_PROCESSING.
.

By default the SDK will use the most powerful NVIDIA graphics card found.
However, when running several applications, or using several cameras at the same time, splitting the load over available GPUs can be useful.
This parameter allows you to select the GPU used by the sl::Camera using an ID from 0 to n-1 GPUs in your PC.
Default: -1

Note
A non-positive value will search for all CUDA capable devices and select the most powerful.

◆ sdk_cuda_ctx

CUcontext sdk_cuda_ctx

CUcontext to be used.

If your application uses another CUDA-capable library, giving its CUDA context to the ZED SDK can be useful when sharing GPU memories.
This parameter allows you to set the CUDA context to be used by the ZED SDK.
Leaving this parameter empty asks the SDK to create its own context.
Default: (empty)

Note
When creating you own CUDA context, you have to define the device you will use. Do not forget to also specify it on sdk_gpu_id.
On Jetson, you have to set the flag CU_CTX_SCHED_YIELD, during CUDA context creation.
You can also let the SDK create its own context, and use sl::Camera::getCUDAContext() to use it.
If you create your own CUDA context, you must ensure that it is destroyed after all SDK objects (sl::Camera, sl::Fusion) are destroyed.

◆ sdk_verbose

int sdk_verbose = 1

Set the verbosity level of the SDK.


When developing an application, enabling verbose (sdk_verbose >= 1) mode can help you understand the current Lidar SDK behavior. However, this might not be desirable in a shipped version.
Default: 1 (enabled)

Note
The verbose messages can also be exported into a log file. See sdk_verbose_log_file for more.

◆ sdk_verbose_log_file

String sdk_verbose_log_file

File path to store the Lidar SDK logs (if sdk_verbose is enabled).


The file will be created if it does not exist.
Default: "" (empty, logs are printed to console only)