Class for managing multiple sensors (Cameras, Lidars) and fusing their data. More...
Functions | |
| Sensors () | |
| Sensors constructor. More... | |
| ~Sensors () | |
| Sensors destructor. More... | |
| SENSORS_ERROR_CODE | init (const sl::InitSensorsParameters &init_parameters=InitSensorsParameters()) |
| Initializes the Sensors instance. This function should be called only once and before any other function. More... | |
| SENSORS_ERROR_CODE | add (const sl::InitParameters &init_parameters, sl::SensorDeviceIdentifier &camera_identifier_out) |
| Adds a camera to the Sensors instance. This function starts the camera and fills the SensorDeviceIdentifier. It should be used for each camera in the system. It is advised to add all cameras, then enable modules. A module cannot include a camera that was not yet added. More... | |
| SENSORS_ERROR_CODE | add (const sl::InitParametersOne &init_parameters, sl::SensorDeviceIdentifier &camera_identifier_out) |
| Adds a ZED One camera to the Sensors instance. More... | |
| SENSORS_ERROR_CODE | add (const sl::InitLidarParameters &init_parameters, sl::SensorDeviceIdentifier &camera_identifier_out) |
| Adds a Lidar to the Sensors instance. More... | |
| SENSORS_ERROR_CODE | remove (sl::SensorDeviceIdentifier &unique_identifier) |
| Stops a sensor and removes it from the instance. This also removes the sensor from all module instances. More... | |
| SENSORS_ERROR_CODE | setSensorPose (const sl::Transform &pose, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Updates the sensor pose relative to the system frame. More... | |
| SENSORS_ERROR_CODE | getSensorPose (sl::Transform &pose, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Gets the sensor pose relative to the system frame. More... | |
| SENSORS_ERROR_CODE | getSensorsID (std::set< SensorDeviceIdentifier > &sensors_identifier) |
| Gets the list of all current active sensors IDs. More... | |
| SENSORS_ERROR_CODE | read () |
| Reads the latest images and IMU from all sensors and rectifies the images. This function is meant to be called before Sensors::process(). More... | |
| SENSORS_ERROR_CODE | process () |
| Processes data from all sensors. This method will call read() if it hasn't been called, then call each sensor's grab in parallel to compute all measures and fused data. This is the main function to be called in a loop. More... | |
| SENSORS_ERROR_CODE | getErrorCodes (BatchedData< sl::ERROR_CODE > &errs) |
| Gets the list of individual ERROR_CODE returned by each sensor in the last function call. More... | |
| SENSORS_ERROR_CODE | getProcessErrorCodes (BatchedData< sl::ERROR_CODE > &errs) |
| Gets the list of individual ERROR_CODE returned by each sensor in the last read/process function call. More... | |
| SENSORS_ERROR_CODE | setRuntimeSensorsParameters (const RuntimeSensorsParameters ¶ms=RuntimeSensorsParameters()) |
| Sets the runtime parameters of Sensors used by process. More... | |
| SENSORS_ERROR_CODE | syncSVO (sl::Timestamp t=sl::Timestamp()) |
| Synchronizes all sensors when the input used is SVO/OSF files. It finds the earliest common timestamp across all camera SVOs and LiDAR OSFs, then sets the playback position of each sensor to that common timestamp. This ensures all sensors start playback from the same point in time. More... | |
| SENSORS_ERROR_CODE | setSVOPositionAtTimestamp (const sl::Timestamp ×tamp) |
| Seeks all sensors to a specific timestamp. This function sets the playback position of all SVO/OSF files to the frame closest to the specified timestamp. It's useful for jumping to a specific point in time during multi-sensor playback. More... | |
| SENSORS_ERROR_CODE | retrieveImage (sl::Mat &mat, const sl::VIEW view=VIEW::LEFT, const sl::MEM type=MEM::CPU, const sl::Resolution image_size=Resolution(0, 0), sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the current VIEW of the specified camera. More... | |
| SENSORS_ERROR_CODE | retrieveMeasure (sl::Mat &mat, const sl::MEASURE measure=MEASURE::DEPTH, const sl::MEM type=MEM::CPU, const sl::Resolution image_size=Resolution(0, 0), sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the current MEASURE of the specified camera. More... | |
| SENSORS_ERROR_CODE | getMotionSensorsData (sl::SensorsData &data, sl::TIME_REFERENCE reference_time, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the current SensorsData (IMU, magnetometer, barometer) of the specified sensor. More... | |
| CameraInformation | getCameraInformation (Resolution image_size=Resolution(0, 0), sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the CameraInformation associated the camera being used. More... | |
| void | updateSelfCalibration (sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Performs a new self-calibration process for the specified camera. In some cases, due to temperature changes or strong vibrations, the stereo calibration becomes less accurate. Use this method to update the self-calibration data and get more reliable depth values. More... | |
| SENSORS_ERROR_CODE | retrieveImage (BatchedData< sl::Mat > &mat_list, const sl::VIEW view=VIEW::LEFT, const sl::MEM type=MEM::CPU, const sl::Resolution image_size=Resolution(0, 0), std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the VIEW of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return images from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | retrieveMeasure (BatchedData< sl::Mat > &mat_list, const sl::MEASURE measure=MEASURE::DEPTH, const sl::MEM type=MEM::CPU, const sl::Resolution image_size=Resolution(0, 0), std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the MEASURE of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return measures from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | retrieveMeasure (BatchedData< sl::Mat > &mat_list, const sl::LIDAR_MEASURE measure=LIDAR_MEASURE::XYZ, const sl::MEM type=MEM::CPU, const sl::Resolution image_size=Resolution(0, 0), std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the LIDAR_MEASURE of all the specified sensors (Lidar). If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return measures from all the sensors of the system (if applicable). More... | |
| SENSORS_ERROR_CODE | getMotionSensorsData (BatchedData< sl::SensorsData > &data, sl::TIME_REFERENCE reference_time, std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the SensorsData (IMU, magnetometer, barometer) of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return SensorsData from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | getCurrentFPS (BatchedData< float > &data, std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the current compute FPS of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | getCurrentFPS (float &fps, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the current compute FPS of the specified camera. More... | |
| SENSORS_ERROR_CODE | getFrameDroppedCount (BatchedData< unsigned int > &data, std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the frame dropped count of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | getFrameDroppedCount (unsigned int &count, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the frame dropped count of the specified sensor. More... | |
| SENSORS_ERROR_CODE | getTimestamp (BatchedData< Timestamp > &data, sl::TIME_REFERENCE reference_time, std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the timestamp of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | getHealthStatus (BatchedData< HealthStatus > &data, std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Returns the health status of all the specified sensors. If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system. More... | |
| SENSORS_ERROR_CODE | setRegionOfInterest (sl::Mat &roi_mask, std::unordered_set< MODULE > module={MODULE::ALL}, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Defines a region of interest to focus on for all the SDK, discarding other parts for the specified camera. More... | |
| SENSORS_ERROR_CODE | getRegionOfInterest (sl::Mat &roi_mask, sl::Resolution image_size=Resolution(0, 0), MODULE module=MODULE::ALL, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Gets the previously set or computed region of interest. More... | |
| SENSORS_ERROR_CODE | startRegionOfInterestAutoDetection (sl::RegionOfInterestParameters roi_param=sl::RegionOfInterestParameters(), sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Starts the auto detection of a region of interest to focus on for all the SDK, discarding other parts for the specified camera. This detection is based on the general motion of the camera combined with the motion in the scene. The camera must move for this process, as an internal motion detector is used (based on the Positional Tracking module). It requires a few hundreds frames of motion to compute the mask. More... | |
| SENSORS_ERROR_CODE | getRegionOfInterestAutoDetectionStatus (REGION_OF_INTEREST_AUTO_DETECTION_STATE &status, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the status of the automatic Region of Interest Detection for the specified camera. The automatic Region of Interest Detection is enabled by using startRegionOfInterestAutoDetection. More... | |
| SENSORS_ERROR_CODE | getCameraSettings (VIDEO_SETTINGS settings, int &setting, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Returns the current value of the requested camera setting (gain, brightness, hue, exposure, etc.). More... | |
| SENSORS_ERROR_CODE | getCameraSettings (VIDEO_SETTINGS settings, int &min_val, int &max_val, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Returns the current range of the requested settings for settings that support min/max values. More... | |
| SENSORS_ERROR_CODE | getCameraSettings (VIDEO_SETTINGS settings, Rect &roi, sl::SIDE side=sl::SIDE::BOTH, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Overloaded method for VIDEO_SETTINGS::AEC_AGC_ROI which takes a Rect as parameter. More... | |
| SENSORS_ERROR_CODE | getCameraSettingsRange (VIDEO_SETTINGS settings, int &min, int &max, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Returns the range for the specified VIDEO_SETTINGS as min/max value. More... | |
| SENSORS_ERROR_CODE | isCameraSettingSupported (VIDEO_SETTINGS setting, bool &is_supported_list, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Checks if the video setting is supported by the camera. More... | |
| SENSORS_ERROR_CODE | setCameraSettings (VIDEO_SETTINGS settings, int value=VIDEO_SETTINGS_VALUE_AUTO, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Sets the value of the requested camera setting (gain, brightness, hue, exposure, etc.). More... | |
| SENSORS_ERROR_CODE | setCameraSettings (VIDEO_SETTINGS settings, int min, int max, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Sets the value of the requested camera setting that supports two values (min/max). More... | |
| SENSORS_ERROR_CODE | setCameraSettings (VIDEO_SETTINGS settings, Rect roi, sl::SIDE side=sl::SIDE::BOTH, bool reset=false, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Overloaded method for VIDEO_SETTINGS::AEC_AGC_ROI which takes a Rect as parameter. More... | |
| SENSORS_ERROR_CODE | enableObjectDetection (const sl::ObjectDetectionSensorsParameters ¶m) |
| Initializes and starts object detection module instance. This function should be called after all cameras are added and before any other function of the module. More... | |
| SENSORS_ERROR_CODE | setObjectDetectionRuntimeParameters (const ObjectDetectionRuntimeParameters ¶ms, const unsigned int instance_id=0, std::set< sl::SensorDeviceIdentifier > cam_identifiers={}) |
| Sets the runtime parameters of the object detection module. By default the object detection module will use the parameters set in the ObjectDetectionRuntimeParameters constructor. This can be changed at any time and will be used for the specified cameras of the instance. Since the processing is done in parallel, the parameters will be used for the next inference. More... | |
| SENSORS_ERROR_CODE | setCustomObjectDetectionRuntimeParameters (const CustomObjectDetectionRuntimeParameters ¶ms, const unsigned int instance_id=0, std::set< sl::SensorDeviceIdentifier > cam_identifiers={}) |
| Sets the custom runtime parameters of the object detection module. By default the object detection module will use the parameters set in the CustomObjectDetectionRuntimeParameters constructor. This can be changed at any time and will be used for the specified cameras of the instance. Since the processing is done in parallel, the parameters will be used for the next inference. More... | |
| SENSORS_ERROR_CODE | ingestCustomBoxObjects (const std::vector< CustomBoxObjectData > &objects_in, const unsigned int instance_id=0, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Feeds the 3D Object tracking method with your own 2D bounding boxes from your own detection algorithm. More... | |
| SENSORS_ERROR_CODE | ingestCustomMaskObjects (const std::vector< CustomMaskObjectData > &objects_in, const unsigned int instance_id=0, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Feeds the 3D Object tracking method with your own 2D masks from your own detection algorithm. More... | |
| SENSORS_ERROR_CODE | retrieveObjects (sl::Objects &objects, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier(), unsigned int instance_module_id=0) |
| Retrieves the raw objects data of the specified object detection instance and sensor. More... | |
| SENSORS_ERROR_CODE | disableObjectDetection (unsigned int instance_module_id=0) |
| Disables the object detection module instance. More... | |
| SENSORS_ERROR_CODE | enableBodyTracking (const sl::BodyTrackingSensorsParameters ¶m) |
| Initializes and starts body tracking module instance. This function should be called after all cameras are added and before any other function of the module. More... | |
| SENSORS_ERROR_CODE | setBodyTrackingRuntimeParameters (const BodyTrackingSensorsRuntimeParameters ¶ms, const unsigned int instance_id=0, std::set< sl::SensorDeviceIdentifier > cam_identifiers={}) |
| Sets the runtime parameters of the body tracking module. By default the body tracking module will use the parameters set in the BodyTrackingRuntimeParameters constructor. This can be changed at any time and will be used for the specified cameras of the instance. Since the processing is done in parallel, the parameters will be used for the next inference. More... | |
| SENSORS_ERROR_CODE | retrieveBodies (sl::Bodies &bodies, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier(), unsigned int instance_module_id=0) |
| Retrieves the raw tracked bodies of the specified sensor of the specified instance. More... | |
| SENSORS_ERROR_CODE | disableBodyTracking (unsigned int instance_module_id=0) |
| Disables the body tracking module instance. More... | |
| SENSORS_ERROR_CODE | enablePositionalTracking (const PositionalTrackingSensorsParameters &tracking_parameters=PositionalTrackingSensorsParameters(), std::set< SensorDeviceIdentifier > sensors_id={}) |
| Initializes and starts the positional tracking processes. More... | |
| POSITIONAL_TRACKING_STATE | getPosition (Pose &camera_pose, SENSORS_REFERENCE_FRAME reference_frame=SENSORS_REFERENCE_FRAME::WORLD, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Retrieves the estimated position and orientation of the sensor in the specified referenceframe". More... | |
| SENSORS_ERROR_CODE | getPosition (BatchedData< std::pair< Pose, POSITIONAL_TRACKING_STATE >> &camera_poses, SENSORS_REFERENCE_FRAME reference_frame=SENSORS_REFERENCE_FRAME::WORLD, std::set< SensorDeviceIdentifier > sensors_id={}) |
| Retrieves the position and orientation of each sensor in the specified reference frame. More... | |
| SENSORS_ERROR_CODE | resetPositionalTracking (const Transform &path, std::set< SensorDeviceIdentifier > sensors_ids={}) |
| Resets the tracking, and re-initializes the position with the given transformation matrix for the specified cameras. More... | |
| void | disablePositionalTracking (String area_file_path="") |
| Disables the positional tracking. More... | |
| bool | isPositionalTrackingEnabled () |
| Returns whether the positional tracking module is enabled. More... | |
| sl::PositionalTrackingStatus | getPositionalTrackingStatus (SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Returns the current status of positional tracking module. More... | |
| SENSORS_ERROR_CODE | saveAreaMap (String area_file_path, SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Saves the current area learning file. The file will contain spatial memory data generated by the tracking. More... | |
| AREA_EXPORTING_STATE | getAreaExportState (SensorDeviceIdentifier sensors_id=defaultSensorDeviceIdentifier()) |
| Returns the state of the spatial memory export process. As saveAreaMap() only starts the exportation, this method allows you to know when the exportation finished or if it failed. More... | |
| SENSORS_ERROR_CODE | enableRecording (const RecordingSensorsParameters &recording_parameters) |
| Enable recording module to creates an SVO file for the specified cameras. More... | |
| RecordingStatus | getRecordingStatus (const SensorDeviceIdentifier &sensors_id=defaultSensorDeviceIdentifier()) |
| Returns the recording status information. More... | |
| void | pauseRecording (bool status, const SensorDeviceIdentifier &sensors_id=defaultSensorDeviceIdentifier()) |
| Pauses or resumes the recording. More... | |
| void | disableRecording (const std::set< SensorDeviceIdentifier > &sensors_ids={}) |
| Disables the recording initiated by enableRecording() and closes the generated file. More... | |
| SENSORS_ERROR_CODE | getSVOPosition (int &svo_position, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the current playback position in the SVO file. The position corresponds to the number of frames already read from the SVO file, starting from 0 to n. Each read() call increases this value by one (except when using SVO real-time mode). More... | |
| SENSORS_ERROR_CODE | getSVOPositionAtTimestamp (int &svo_position, const sl::Timestamp ×tamp, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Retrieves the frame index within the SVO file corresponding to the provided timestamp. More... | |
| SENSORS_ERROR_CODE | setSVOPosition (int svo_position, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Sets the playback cursor to the desired frame number in the SVO file. This method allows you to move around within a played-back SVO file. After calling, the next call to read() will read the provided frame number. More... | |
| SENSORS_ERROR_CODE | getSVONumberOfFrames (int &number_of_frames, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Returns the number of frames in the SVO file. More... | |
| SENSORS_ERROR_CODE | ingestDataIntoSVO (const sl::SVOData &data, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Ingest custom user SVOData in a SVO file. More... | |
| SENSORS_ERROR_CODE | retrieveSVOData (const std::string &key, std::map< sl::Timestamp, sl::SVOData > &data, sl::Timestamp ts_begin=0, sl::Timestamp ts_end=0, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Retrieves SVO data from the SVO file at the given channel key and in the given timestamp range. More... | |
| SENSORS_ERROR_CODE | getSVODataKeys (std::vector< std::string > &keys, sl::SensorDeviceIdentifier unique_identifier=defaultSensorDeviceIdentifier()) |
| Get the external (custom data) channels that can be retrieved from the SVO file. More... | |
| SENSORS_ERROR_CODE | enableStreaming (const StreamingSensorsParameters &streaming_parameters=StreamingSensorsParameters()) |
| Creates a streaming pipeline. More... | |
| void | disableStreaming (const std::set< SensorDeviceIdentifier > &sensors_ids={}) |
| Disables the streaming initiated by enableStreaming(). More... | |
| SENSORS_ERROR_CODE | close () |
| Closes the Sensors instance, releasing all resources and cameras. More... | |
| Sensors (const Sensors &)=delete | |
| The Sensors object cannot be copied. Therefore, its copy constructor is disabled. More... | |
| Sensors & | operator= (const Sensors &)=delete |
| The Sensors object cannot be copied. Therefore, its copy assignment operator is disabled. More... | |
Static Functions | |
| static SensorList | getSensorList () |
| List all the connected sensor devices (cameras and lidars) with their associated information. More... | |
| static StreamingSensorList | getStreamingSensorList () |
| List all the streaming sensor devices (cameras and lidars) with their associated information. More... | |
Class for managing multiple sensors (Cameras, Lidars) and fusing their data.
The Sensors class allows you to:
The Sensors object cannot be copied. Therefore, its copy constructor is disabled.
|
static |
List all the connected sensor devices (cameras and lidars) with their associated information.
This method aggregates results from:
|
static |
List all the streaming sensor devices (cameras and lidars) with their associated information.
This method aggregates results from:
| SENSORS_ERROR_CODE init | ( | const sl::InitSensorsParameters & | init_parameters = InitSensorsParameters() | ) |
Initializes the Sensors instance.
This function should be called only once and before any other function.
| init_parameters | : The initialization parameters. |
| SENSORS_ERROR_CODE add | ( | const sl::InitParameters & | init_parameters, |
| sl::SensorDeviceIdentifier & | camera_identifier_out | ||
| ) |
Adds a camera to the Sensors instance.
This function starts the camera and fills the SensorDeviceIdentifier.
It should be used for each camera in the system.
It is advised to add all cameras, then enable modules. A module cannot include a camera that was not yet added.
| init_parameters | : The initialization parameters for the camera. | |
| [out] | camera_identifier_out | : The identifier of the added camera. |
| SENSORS_ERROR_CODE add | ( | const sl::InitParametersOne & | init_parameters, |
| sl::SensorDeviceIdentifier & | camera_identifier_out | ||
| ) |
Adds a ZED One camera to the Sensors instance.
| init_parameters | : The initialization parameters for the ZED One camera. | |
| [out] | camera_identifier_out | : The identifier of the added camera. |
| SENSORS_ERROR_CODE add | ( | const sl::InitLidarParameters & | init_parameters, |
| sl::SensorDeviceIdentifier & | camera_identifier_out | ||
| ) |
Adds a Lidar to the Sensors instance.
| init_parameters | : The initialization parameters for the Lidar. | |
| [out] | camera_identifier_out | : The identifier of the added Lidar. |
| SENSORS_ERROR_CODE remove | ( | sl::SensorDeviceIdentifier & | unique_identifier | ) |
Stops a sensor and removes it from the instance.
This also removes the sensor from all module instances.
| unique_identifier | : The identifier of the sensor to remove. |
| SENSORS_ERROR_CODE setSensorPose | ( | const sl::Transform & | pose, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Updates the sensor pose relative to the system frame.
| pose | : The new pose. |
| unique_identifier | : The identifier of the sensor. |
| SENSORS_ERROR_CODE getSensorPose | ( | sl::Transform & | pose, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Gets the sensor pose relative to the system frame.
| [out] | pose | : The retrieved pose. |
| unique_identifier | : The identifier of the sensor. |
| SENSORS_ERROR_CODE getSensorsID | ( | std::set< SensorDeviceIdentifier > & | sensors_identifier | ) |
Gets the list of all current active sensors IDs.
| [out] | sensors_identifier | : The set of active sensor identifiers. |
| SENSORS_ERROR_CODE read | ( | ) |
Reads the latest images and IMU from all sensors and rectifies the images.
This function is meant to be called before Sensors::process().
| SENSORS_ERROR_CODE process | ( | ) |
Processes data from all sensors.
This method will call read() if it hasn't been called, then call each sensor's grab in parallel to compute all measures and fused data.
This is the main function to be called in a loop.
| SENSORS_ERROR_CODE getErrorCodes | ( | BatchedData< sl::ERROR_CODE > & | errs | ) |
Gets the list of individual ERROR_CODE returned by each sensor in the last function call.
| [out] | errs | : A map of sensor ID to error code. |
| SENSORS_ERROR_CODE getProcessErrorCodes | ( | BatchedData< sl::ERROR_CODE > & | errs | ) |
Gets the list of individual ERROR_CODE returned by each sensor in the last read/process function call.
| [out] | errs | : A map of sensor ID to error code. |
| SENSORS_ERROR_CODE setRuntimeSensorsParameters | ( | const RuntimeSensorsParameters & | params = RuntimeSensorsParameters() | ) |
Sets the runtime parameters of Sensors used by process.
| params | : The runtime parameters. |
| SENSORS_ERROR_CODE syncSVO | ( | sl::Timestamp | t = sl::Timestamp() | ) |
Synchronizes all sensors when the input used is SVO/OSF files.
It finds the earliest common timestamp across all camera SVOs and LiDAR OSFs,
then sets the playback position of each sensor to that common timestamp.
This ensures all sensors start playback from the same point in time.
| t | : The timestamp to sync to. If 0 (default), automatically finds the latest start timestamp among all files. |
| SENSORS_ERROR_CODE setSVOPositionAtTimestamp | ( | const sl::Timestamp & | timestamp | ) |
Seeks all sensors to a specific timestamp.
This function sets the playback position of all SVO/OSF files to the frame closest to the specified timestamp.
It's useful for jumping to a specific point in time during multi-sensor playback.
| timestamp | : The timestamp to seek to. |
| SENSORS_ERROR_CODE retrieveImage | ( | sl::Mat & | mat, |
| const sl::VIEW | view = VIEW::LEFT, |
||
| const sl::MEM | type = MEM::CPU, |
||
| const sl::Resolution | image_size = Resolution(0, 0), |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current VIEW of the specified camera.
| [out] | mat | : The retrieved image. |
| view | : The view to retrieve. | |
| type | : The memory type (CPU/GPU). | |
| image_size | : The resolution of the output image. | |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE retrieveMeasure | ( | sl::Mat & | mat, |
| const sl::MEASURE | measure = MEASURE::DEPTH, |
||
| const sl::MEM | type = MEM::CPU, |
||
| const sl::Resolution | image_size = Resolution(0, 0), |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current MEASURE of the specified camera.
| [out] | mat | : The retrieved measure. |
| measure | : The measure to retrieve. | |
| type | : The memory type (CPU/GPU). | |
| image_size | : The resolution of the output measure. | |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getMotionSensorsData | ( | sl::SensorsData & | data, |
| sl::TIME_REFERENCE | reference_time, | ||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current SensorsData (IMU, magnetometer, barometer) of the specified sensor.
| [out] | data | : The retrieved motion sensors data. |
| reference_time | : The time reference. | |
| unique_identifier | : The sensor identifier. |
| CameraInformation getCameraInformation | ( | Resolution | image_size = Resolution(0, 0), |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the CameraInformation associated the camera being used.
| image_size | : The resolution for the calibration parameters. |
| unique_identifier | : The camera identifier. |
| void updateSelfCalibration | ( | sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() | ) |
Performs a new self-calibration process for the specified camera.
In some cases, due to temperature changes or strong vibrations, the stereo calibration becomes less accurate.
Use this method to update the self-calibration data and get more reliable depth values.
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE retrieveImage | ( | BatchedData< sl::Mat > & | mat_list, |
| const sl::VIEW | view = VIEW::LEFT, |
||
| const sl::MEM | type = MEM::CPU, |
||
| const sl::Resolution | image_size = Resolution(0, 0), |
||
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the VIEW of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return images from all the sensors of the system.
| [out] | mat_list | : The retrieved images. |
| view | : The view to retrieve. | |
| type | : The memory type (CPU/GPU). | |
| image_size | : The resolution of the output images. | |
| sensors_ids | : The set of sensor identifiers to retrieve. |
| SENSORS_ERROR_CODE retrieveMeasure | ( | BatchedData< sl::Mat > & | mat_list, |
| const sl::MEASURE | measure = MEASURE::DEPTH, |
||
| const sl::MEM | type = MEM::CPU, |
||
| const sl::Resolution | image_size = Resolution(0, 0), |
||
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the MEASURE of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return measures from all the sensors of the system.
| [out] | mat_list | : The retrieved measures. |
| measure | : The measure to retrieve. | |
| type | : The memory type (CPU/GPU). | |
| image_size | : The resolution of the output measures. | |
| sensors_ids | : The set of sensor identifiers to retrieve. |
| SENSORS_ERROR_CODE retrieveMeasure | ( | BatchedData< sl::Mat > & | mat_list, |
| const sl::LIDAR_MEASURE | measure = LIDAR_MEASURE::XYZ, |
||
| const sl::MEM | type = MEM::CPU, |
||
| const sl::Resolution | image_size = Resolution(0, 0), |
||
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the LIDAR_MEASURE of all the specified sensors (Lidar).
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return measures from all the sensors of the system (if applicable).
| [out] | mat_list | : The retrieved measures. |
| measure | : The lidar measure to retrieve. | |
| type | : The memory type (CPU/GPU). | |
| image_size | : The resolution of the output measures. | |
| sensors_ids | : The set of sensor identifiers to retrieve. |
| SENSORS_ERROR_CODE getMotionSensorsData | ( | BatchedData< sl::SensorsData > & | data, |
| sl::TIME_REFERENCE | reference_time, | ||
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the SensorsData (IMU, magnetometer, barometer) of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return SensorsData from all the sensors of the system.
| [out] | data | : The retrieved sensors data. |
| reference_time | : The time reference. | |
| sensors_ids | : The set of sensor identifiers to retrieve. |
| SENSORS_ERROR_CODE getCurrentFPS | ( | BatchedData< float > & | data, |
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the current compute FPS of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system.
| [out] | data | : The retrieved FPS. |
| sensors_ids | : The set of sensor identifiers query. |
| SENSORS_ERROR_CODE getCurrentFPS | ( | float & | fps, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current compute FPS of the specified camera.
| [out] | fps | : The retrieved FPS. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getFrameDroppedCount | ( | BatchedData< unsigned int > & | data, |
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the frame dropped count of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system.
| [out] | data | : The retrieved dropped frame counts. |
| sensors_ids | : The set of sensor identifiers query. |
| SENSORS_ERROR_CODE getFrameDroppedCount | ( | unsigned int & | count, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the frame dropped count of the specified sensor.
| [out] | count | : The retrieved dropped frame count. |
| unique_identifier | : The sensor identifier. |
| SENSORS_ERROR_CODE getTimestamp | ( | BatchedData< Timestamp > & | data, |
| sl::TIME_REFERENCE | reference_time, | ||
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the timestamp of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system.
| [out] | data | : The retrieved timestamps. |
| reference_time | : The time reference (IMAGE or CURRENT). | |
| sensors_ids | : The set of sensor identifiers query. |
| SENSORS_ERROR_CODE getHealthStatus | ( | BatchedData< HealthStatus > & | data, |
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Returns the health status of all the specified sensors.
If sensors_ids is empty or if the set contains defaultSensorDeviceIdentifier(), it will return the data from all the sensors of the system.
| [out] | data | : The retrieved health statuses. |
| sensors_ids | : The set of sensor identifiers query. |
| SENSORS_ERROR_CODE setRegionOfInterest | ( | sl::Mat & | roi_mask, |
| std::unordered_set< MODULE > | module = {MODULE::ALL}, |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Defines a region of interest to focus on for all the SDK, discarding other parts for the specified camera.
| [in] | roi_mask | : The mask defining the region of interest. |
| module | : The module to apply the ROI to. | |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getRegionOfInterest | ( | sl::Mat & | roi_mask, |
| sl::Resolution | image_size = Resolution(0, 0), |
||
| MODULE | module = MODULE::ALL, |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Gets the previously set or computed region of interest.
| [out] | roi_mask | : The mask defining the region of interest. |
| image_size | : The size of the mask. | |
| module | : The module the ROI applies to. | |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE startRegionOfInterestAutoDetection | ( | sl::RegionOfInterestParameters | roi_param = sl::RegionOfInterestParameters(), |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Starts the auto detection of a region of interest to focus on for all the SDK, discarding other parts for the specified camera.
This detection is based on the general motion of the camera combined with the motion in the scene.
The camera must move for this process, as an internal motion detector is used (based on the Positional Tracking module).
It requires a few hundreds frames of motion to compute the mask.
| roi_param | : Parameters for ROI auto detection. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getRegionOfInterestAutoDetectionStatus | ( | REGION_OF_INTEREST_AUTO_DETECTION_STATE & | status, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the status of the automatic Region of Interest Detection for the specified camera.
The automatic Region of Interest Detection is enabled by using startRegionOfInterestAutoDetection.
| [out] | status | : The current status of the auto detection. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getCameraSettings | ( | VIDEO_SETTINGS | settings, |
| int & | setting, | ||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current value of the requested camera setting (gain, brightness, hue, exposure, etc.).
| settings | : The setting to retrieve. | |
| [out] | setting | : The retrieved value. |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE getCameraSettings | ( | VIDEO_SETTINGS | settings, |
| int & | min_val, | ||
| int & | max_val, | ||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current range of the requested settings for settings that support min/max values.
This method only works with the following VIDEO_SETTINGS:
| settings | : The setting to retrieve. | |
| [out] | min_val | : The retrieved minimum value. |
| [out] | max_val | : The retrieved maximum value. |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE getCameraSettings | ( | VIDEO_SETTINGS | settings, |
| Rect & | roi, | ||
| sl::SIDE | side = sl::SIDE::BOTH, |
||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Overloaded method for VIDEO_SETTINGS::AEC_AGC_ROI which takes a Rect as parameter.
| settings | : The setting to retrieve. | |
| [out] | roi | : The retrieved ROI. |
| side | : The side (Left/Right/Both). | |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE getCameraSettingsRange | ( | VIDEO_SETTINGS | settings, |
| int & | min, | ||
| int & | max, | ||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the range for the specified VIDEO_SETTINGS as min/max value.
| settings | : The setting to retrieve range for. | |
| [out] | min | : The retrieved minimum value. |
| [out] | max | : The retrieved maximum value. |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE isCameraSettingSupported | ( | VIDEO_SETTINGS | setting, |
| bool & | is_supported_list, | ||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Checks if the video setting is supported by the camera.
| setting | : The setting to check. | |
| [out] | is_supported_list | : True if supported. |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE setCameraSettings | ( | VIDEO_SETTINGS | settings, |
| int | value = VIDEO_SETTINGS_VALUE_AUTO, |
||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Sets the value of the requested camera setting (gain, brightness, hue, exposure, etc.).
This method only applies for VIDEO_SETTINGS that require a single value.
| settings | : The setting to set. |
| value | : The value to set (default: VIDEO_SETTINGS_VALUE_AUTO). |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE setCameraSettings | ( | VIDEO_SETTINGS | settings, |
| int | min, | ||
| int | max, | ||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Sets the value of the requested camera setting that supports two values (min/max).
This method only works with the following VIDEO_SETTINGS:
| settings | : The setting to set. |
| min | : The minimum value. |
| max | : The maximum value. |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE setCameraSettings | ( | VIDEO_SETTINGS | settings, |
| Rect | roi, | ||
| sl::SIDE | side = sl::SIDE::BOTH, |
||
| bool | reset = false, |
||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Overloaded method for VIDEO_SETTINGS::AEC_AGC_ROI which takes a Rect as parameter.
| settings | : The setting to set. |
| roi | : The ROI to set. |
| side | : The side (Left/Right/Both). |
| reset | : Whether to reset the ROI. |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE enableObjectDetection | ( | const sl::ObjectDetectionSensorsParameters & | param | ) |
Initializes and starts object detection module instance.
This function should be called after all cameras are added and before any other function of the module.
| param | : The object detection parameters. |
| SENSORS_ERROR_CODE setObjectDetectionRuntimeParameters | ( | const ObjectDetectionRuntimeParameters & | params, |
| const unsigned int | instance_id = 0, |
||
| std::set< sl::SensorDeviceIdentifier > | cam_identifiers = {} |
||
| ) |
Sets the runtime parameters of the object detection module.
By default the object detection module will use the parameters set in the ObjectDetectionRuntimeParameters constructor.
This can be changed at any time and will be used for the specified cameras of the instance. Since the processing is done in parallel, the parameters will be used for the next inference.
| params | : The runtime parameters. |
| instance_id | : The instance ID. |
| cam_identifiers | : The set of camera identifiers to apply parameters to. |
| SENSORS_ERROR_CODE setCustomObjectDetectionRuntimeParameters | ( | const CustomObjectDetectionRuntimeParameters & | params, |
| const unsigned int | instance_id = 0, |
||
| std::set< sl::SensorDeviceIdentifier > | cam_identifiers = {} |
||
| ) |
Sets the custom runtime parameters of the object detection module.
By default the object detection module will use the parameters set in the CustomObjectDetectionRuntimeParameters constructor.
This can be changed at any time and will be used for the specified cameras of the instance. Since the processing is done in parallel, the parameters will be used for the next inference.
| params | : The custom runtime parameters. |
| instance_id | : The instance ID. |
| cam_identifiers | : The set of camera identifiers to apply parameters to. |
| SENSORS_ERROR_CODE ingestCustomBoxObjects | ( | const std::vector< CustomBoxObjectData > & | objects_in, |
| const unsigned int | instance_id = 0, |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Feeds the 3D Object tracking method with your own 2D bounding boxes from your own detection algorithm.
| objects_in | : The input custom objects. |
| instance_id | : The instance ID. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE ingestCustomMaskObjects | ( | const std::vector< CustomMaskObjectData > & | objects_in, |
| const unsigned int | instance_id = 0, |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Feeds the 3D Object tracking method with your own 2D masks from your own detection algorithm.
| objects_in | : The input custom objects. |
| instance_id | : The instance ID. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE retrieveObjects | ( | sl::Objects & | objects, |
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier(), |
||
| unsigned int | instance_module_id = 0 |
||
| ) |
Retrieves the raw objects data of the specified object detection instance and sensor.
| [out] | objects | : The retrieved objects. |
| sensors_id | : The sensor identifier. | |
| instance_module_id | : The instance ID. |
| SENSORS_ERROR_CODE disableObjectDetection | ( | unsigned int | instance_module_id = 0 | ) |
Disables the object detection module instance.
| instance_module_id | : The instance ID. |
| SENSORS_ERROR_CODE enableBodyTracking | ( | const sl::BodyTrackingSensorsParameters & | param | ) |
Initializes and starts body tracking module instance.
This function should be called after all cameras are added and before any other function of the module.
| param | : The body tracking parameters. |
| SENSORS_ERROR_CODE setBodyTrackingRuntimeParameters | ( | const BodyTrackingSensorsRuntimeParameters & | params, |
| const unsigned int | instance_id = 0, |
||
| std::set< sl::SensorDeviceIdentifier > | cam_identifiers = {} |
||
| ) |
Sets the runtime parameters of the body tracking module.
By default the body tracking module will use the parameters set in the BodyTrackingRuntimeParameters constructor.
This can be changed at any time and will be used for the specified cameras of the instance. Since the processing is done in parallel, the parameters will be used for the next inference.
| params | : The runtime parameters. |
| instance_id | : The instance ID. |
| cam_identifiers | : The set of camera identifiers to apply parameters to. |
| SENSORS_ERROR_CODE retrieveBodies | ( | sl::Bodies & | bodies, |
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier(), |
||
| unsigned int | instance_module_id = 0 |
||
| ) |
Retrieves the raw tracked bodies of the specified sensor of the specified instance.
| [out] | bodies | : The retrieved bodies. |
| sensors_id | : The sensor identifier. | |
| instance_module_id | : The instance ID. |
| SENSORS_ERROR_CODE disableBodyTracking | ( | unsigned int | instance_module_id = 0 | ) |
Disables the body tracking module instance.
| instance_module_id | : The instance ID. |
| SENSORS_ERROR_CODE enablePositionalTracking | ( | const PositionalTrackingSensorsParameters & | tracking_parameters = PositionalTrackingSensorsParameters(), |
| std::set< SensorDeviceIdentifier > | sensors_id = {} |
||
| ) |
Initializes and starts the positional tracking processes.
| tracking_parameters | : The positional tracking parameters. |
| sensors_id | : The set of sensor identifiers to enable tracking for. |
| POSITIONAL_TRACKING_STATE getPosition | ( | Pose & | camera_pose, |
| SENSORS_REFERENCE_FRAME | reference_frame = SENSORS_REFERENCE_FRAME::WORLD, |
||
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Retrieves the estimated position and orientation of the sensor in the specified referenceframe".
| [out] | camera_pose | : The retrieved pose. |
| reference_frame | : The reference frame for the pose. | |
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE getPosition | ( | BatchedData< std::pair< Pose, POSITIONAL_TRACKING_STATE >> & | camera_poses, |
| SENSORS_REFERENCE_FRAME | reference_frame = SENSORS_REFERENCE_FRAME::WORLD, |
||
| std::set< SensorDeviceIdentifier > | sensors_id = {} |
||
| ) |
Retrieves the position and orientation of each sensor in the specified reference frame.
| [out] | camera_poses | : The retrieved poses and tracking states. |
| reference_frame | : The reference frame for the poses. | |
| sensors_id | : The set of sensor identifiers to retrieve. |
| SENSORS_ERROR_CODE resetPositionalTracking | ( | const Transform & | path, |
| std::set< SensorDeviceIdentifier > | sensors_ids = {} |
||
| ) |
Resets the tracking, and re-initializes the position with the given transformation matrix for the specified cameras.
| path | : Position of the camera in the world frame when the method is called. |
| sensors_ids | : The set of sensor identifiers to reset tracking for. |
| void disablePositionalTracking | ( | String | area_file_path = "" | ) |
Disables the positional tracking.
The positional tracking is immediately stopped. If a file path is given, saveAreaMap() will be called asynchronously. See getAreaExportState() to get the exportation state.
If the tracking has been enabled, this function will automatically be called by close() .
| area_file_path | : The path to save the area map to. |
| bool isPositionalTrackingEnabled | ( | ) |
Returns whether the positional tracking module is enabled.
| sl::PositionalTrackingStatus getPositionalTrackingStatus | ( | SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() | ) |
Returns the current status of positional tracking module.
| sensors_id | : The sensor identifier. |
| SENSORS_ERROR_CODE saveAreaMap | ( | String | area_file_path, |
| SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Saves the current area learning file. The file will contain spatial memory data generated by the tracking.
If the tracking has been initialized with PositionalTrackingSensorsParameters::enable_area_memory to true (default), the method allows you to export the spatial memory.
Reloading the exported file in a future session with PositionalTrackingSensorsParameters::area_file_path initializes the tracking within the same referential.
This method is asynchronous, and only triggers the file generation. You can use getAreaExportState() to get the export state. The positional tracking keeps running while exporting.
| AREA_EXPORTING_STATE getAreaExportState | ( | SensorDeviceIdentifier | sensors_id = defaultSensorDeviceIdentifier() | ) |
Returns the state of the spatial memory export process. As saveAreaMap() only starts the exportation, this method allows you to know when the exportation finished or if it failed.
| SENSORS_ERROR_CODE enableRecording | ( | const RecordingSensorsParameters & | recording_parameters | ) |
Enable recording module to creates an SVO file for the specified cameras.
SVO files are custom video files containing the un-rectified images from the camera along with some meta-data like timestamps or IMU orientation (if applicable).
They can be used to simulate a live ZED and test a sequence with various SDK parameters.
Depending on the application, various compression modes are available. See SVO_COMPRESSION_MODE.
| RecordingStatus getRecordingStatus | ( | const SensorDeviceIdentifier & | sensors_id = defaultSensorDeviceIdentifier() | ) |
Returns the recording status information.
| sensors_id | : The sensor identifier. |
| void pauseRecording | ( | bool | status, |
| const SensorDeviceIdentifier & | sensors_id = defaultSensorDeviceIdentifier() |
||
| ) |
Pauses or resumes the recording.
| status | : If true, the recording is paused. If false, the recording is resumed. |
| sensors_id | : The sensor identifier. |
| void disableRecording | ( | const std::set< SensorDeviceIdentifier > & | sensors_ids = {} | ) |
Disables the recording initiated by enableRecording() and closes the generated file.
| sensors_ids | : The set of sensor identifiers to stop recording for. |
| SENSORS_ERROR_CODE getSVOPosition | ( | int & | svo_position, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the current playback position in the SVO file. The position corresponds to the number of frames already read from the SVO file, starting from 0 to n.
Each read() call increases this value by one (except when using SVO real-time mode).
| [out] | svo_position | : The current frame position. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getSVOPositionAtTimestamp | ( | int & | svo_position, |
| const sl::Timestamp & | timestamp, | ||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Retrieves the frame index within the SVO file corresponding to the provided timestamp.
| [out] | svo_position | : The retrieved SVO position. |
| timestamp | : The timestamp to search for. | |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE setSVOPosition | ( | int | svo_position, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Sets the playback cursor to the desired frame number in the SVO file. This method allows you to move around within a played-back SVO file. After calling, the next call to read() will read the provided frame number.
| svo_position | : The frame number to jump to. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getSVONumberOfFrames | ( | int & | number_of_frames, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Returns the number of frames in the SVO file.
| [out] | number_of_frames | : The total number of frames in the SVO file. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE ingestDataIntoSVO | ( | const sl::SVOData & | data, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Ingest custom user SVOData in a SVO file.
| data | : The SVO data to ingest. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE retrieveSVOData | ( | const std::string & | key, |
| std::map< sl::Timestamp, sl::SVOData > & | data, | ||
| sl::Timestamp | ts_begin = 0, |
||
| sl::Timestamp | ts_end = 0, |
||
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Retrieves SVO data from the SVO file at the given channel key and in the given timestamp range.
| key | : The key of the SVOData that is going to be retrieved. | |
| [out] | data | : The map to be filled with SVOData objects, with timestamps as keys. |
| ts_begin | : The beginning of the range. | |
| ts_end | : The end of the range. | |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE getSVODataKeys | ( | std::vector< std::string > & | keys, |
| sl::SensorDeviceIdentifier | unique_identifier = defaultSensorDeviceIdentifier() |
||
| ) |
Get the external (custom data) channels that can be retrieved from the SVO file.
| [out] | keys | : The list of available keys. |
| unique_identifier | : The camera identifier. |
| SENSORS_ERROR_CODE enableStreaming | ( | const StreamingSensorsParameters & | streaming_parameters = StreamingSensorsParameters() | ) |
Creates a streaming pipeline.
| streaming_parameters | : A structure containing all the specific parameters for the streaming. Default: a reset of StreamingParameters . |
| void disableStreaming | ( | const std::set< SensorDeviceIdentifier > & | sensors_ids = {} | ) |
Disables the streaming initiated by enableStreaming().
| sensors_ids | : The set of sensor identifiers to stop streaming for. |
| SENSORS_ERROR_CODE close | ( | ) |
Closes the Sensors instance, releasing all resources and cameras.