Fusion Class Reference

Holds Fusion process data and functions More...

Classes

struct  sl_GNSSCalibrationParameters
 DLL-friendly version of GNSSCalibrationParameters (found in ZEDCommon.cs). More...
 
struct  sl_PositionalTrackingFusionParameters
 DLL-friendly version of PositionalTrackingFusionParameters (found in ZEDCommon.cs). More...
 

Functions

void Close ()
 
void ReadConfigurationFile (System.Text.StringBuilder jsonConfigFileName, COORDINATE_SYSTEM coordinateSystem, UNIT unit, ref FusionConfiguration[] configs, ref int nbCameras)
 Read a Configuration JSON file to configure a fusion process. More...
 
SENDER_ERROR_CODE GetSenderState (ref CameraIdentifier uuid)
 Returns the state of a connected data sender. More...
 
FUSION_ERROR_CODE Init (ref InitFusionParameters initFusionParameters)
 FusionHandler initialisation. Initializes memory/generic datas More...
 
FUSION_ERROR_CODE Process ()
 processes the fusion. More...
 
FUSION_ERROR_CODE Subscribe (ref CameraIdentifier uuid, string jsonConfigFileName, ref Vector3 poseTranslation, ref System.Numerics.Quaternion poseRotation)
 adds a camera to the multi camera handler More...
 
FUSION_ERROR_CODE Unsubscribe (ref CameraIdentifier uuid)
 Remove the specified camera from data provider. More...
 
FUSION_ERROR_CODE UpdatePose (ref CameraIdentifier uuid, ref Vector3 poseTranslation, ref System.Numerics.Quaternion poseRotation)
 updates the camera World pose More...
 
FUSION_ERROR_CODE RetrieveImage (Mat mat, ref CameraIdentifier uuid, Resolution resolution=new sl.Resolution())
 Returns the current sl.VIEW.LEFT of the specified camera, the data is synchronized. More...
 
FUSION_ERROR_CODE RetrieveMeasure (Mat mat, ref CameraIdentifier uuid, MEASURE measure=MEASURE.DEPTH, Resolution resolution=new sl.Resolution())
 Returns the current measure of the specified camera, the data is synchronized. More...
 
FUSION_ERROR_CODE EnableBodyTracking (ref BodyTrackingFusionParameters btfParams)
 enables the body tracking module More...
 
void DisableBodyTracking ()
 disable the body tracking module More...
 
FUSION_ERROR_CODE RetrieveBodies (ref Bodies bodies, ref BodyTrackingFusionRuntimeParameters rtparams, CameraIdentifier uuid)
 retrieves the body data, can be the fused data (default), or the raw data provided by a specific sender More...
 
FUSION_ERROR_CODE GetProcessMetrics (ref FusionMetrics metrics)
 gets the metrics of the Fusion process, for the fused data as well as individual camera provider data More...
 
FUSION_ERROR_CODE EnablePositionalTracking (ref PositionalTrackingFusionParameters ptfParams)
 enables positional tracking module More...
 
POSITIONAL_TRACKING_STATE GetPosition (ref Pose pose, REFERENCE_FRAME referenceFrame, UNIT unit, ref CameraIdentifier uuid, POSITION_TYPE retrieveType)
 Gets the Fused Position of the camera system More...
 
FusedPositionalTrackingStatus GetFusedPositionalTrackingStatus ()
 Gets the current status of fused position. More...
 
void DisablePositionalTracking ()
 Disables the positional tracking More...
 
void IngestGNSSData (ref GNSSData data)
 ingests GNSS data from an external sensor into the fusion module More...
 
POSITIONAL_TRACKING_STATE GetCurrentGNSSData (ref GNSSData data)
 returns the current GNSS data More...
 
GNSS_FUSION_STATUS GetGeoPose (ref GeoPose pose)
 returns the current GeoPose More...
 
GNSS_FUSION_STATUS GeoToCamera (ref LatLng inLatLng, out Pose outPose)
 Converts latitude / longitude into position in sl::Fusion coordinate system. More...
 
GNSS_FUSION_STATUS CameraToGeo (ref Pose inPose, out GeoPose outGeoPose)
 Converts a position in sl::Fusion coordinate system in real world coordinate. More...
 
ulong GetCurrentTimestamp ()
 Gets the current timestamp. More...
 
GNSS_FUSION_STATUS GetCurrentGNSSCalibrationStd (ref float yawStd, ref Vector3 positionStd)
 Get the current calibration uncertainty defined during calibration process More...
 
void GetGeoTrackingCalibration (ref Vector3 position, ref System.Numerics.Quaternion rotation)
 Get the calibration found between VIO and GNSS More...
 

Detailed Description

Holds Fusion process data and functions

Functions

◆ Close()

void Close ( )
inline

◆ ReadConfigurationFile()

void ReadConfigurationFile ( System.Text.StringBuilder  jsonConfigFileName,
COORDINATE_SYSTEM  coordinateSystem,
UNIT  unit,
ref FusionConfiguration[]  configs,
ref int  nbCameras 
)
inline

Read a Configuration JSON file to configure a fusion process.

Parameters
jsonConfigFileNameThe name of the JSON file containing the configuration.
coordinateSystemThe COORDINATE_SYSTEM in which you want the World Pose to be in.
unitThe UNIT in which you want the World Pose to be in.
configsAn array of FusionConfiguration for all the camera present in the file.
nbCamerasNumber of cameras

◆ GetSenderState()

SENDER_ERROR_CODE GetSenderState ( ref CameraIdentifier  uuid)
inline

Returns the state of a connected data sender.

Parameters
uuidIdentifier of the camera.
Returns
State of the sender

◆ Init()

FUSION_ERROR_CODE Init ( ref InitFusionParameters  initFusionParameters)
inline

FusionHandler initialisation. Initializes memory/generic datas

Parameters
initFusionParameters
Returns

◆ Process()

FUSION_ERROR_CODE Process ( )
inline

processes the fusion.

Returns

◆ Subscribe()

FUSION_ERROR_CODE Subscribe ( ref CameraIdentifier  uuid,
string  jsonConfigFileName,
ref Vector3  poseTranslation,
ref System.Numerics.Quaternion  poseRotation 
)
inline

adds a camera to the multi camera handler

Parameters
uuid
jsonConfigFileName
poseTranslation
poseRotation
Returns

◆ Unsubscribe()

FUSION_ERROR_CODE Unsubscribe ( ref CameraIdentifier  uuid)
inline

Remove the specified camera from data provider.

Parameters
uuidThe requested camera identifier.
Returns
FUSION_ERROR_CODE "SUCCESS" if it goes as it should, otherwise it returns an FUSION_ERROR_CODE.

◆ UpdatePose()

FUSION_ERROR_CODE UpdatePose ( ref CameraIdentifier  uuid,
ref Vector3  poseTranslation,
ref System.Numerics.Quaternion  poseRotation 
)
inline

updates the camera World pose

Parameters
uuid
poseTranslation
poseRotation
Returns

◆ RetrieveImage()

FUSION_ERROR_CODE RetrieveImage ( Mat  mat,
ref CameraIdentifier  uuid,
Resolution  resolution = new sl.Resolution() 
)
inline

Returns the current sl.VIEW.LEFT of the specified camera, the data is synchronized.

Parameters
matthe CPU BGRA image of the requested camera.
uuidthe requested camera identifier.
resolutionthe requested resolution of the output image, can be lower or equal (default) to the original image resolution.
Returns
FUSION_ERROR_CODE "SUCCESS" if it goes as it should, otherwise it returns an FUSION_ERROR_CODE.

◆ RetrieveMeasure()

FUSION_ERROR_CODE RetrieveMeasure ( Mat  mat,
ref CameraIdentifier  uuid,
MEASURE  measure = MEASURE.DEPTH,
Resolution  resolution = new sl.Resolution() 
)
inline

Returns the current measure of the specified camera, the data is synchronized.

Parameters
matthe CPU data of the requested camera.
uuidthe requested camera identifier.
typethe requested measure type, by default DEPTH (F32_C1)

Only MEASURE: DEPTH, XYZ, XYZRGBA, XYZBGRA, XYZARGB, XYZABGR, DEPTH_U16_MM are available.

Parameters
resolutionthe requested resolution of the output image, can be lower or equal (default) to the original image resolution.
Returns
FUSION_ERROR_CODE "SUCCESS" if it goes as it should, otherwise it returns an FUSION_ERROR_CODE.

◆ EnableBodyTracking()

FUSION_ERROR_CODE EnableBodyTracking ( ref BodyTrackingFusionParameters  btfParams)
inline

enables the body tracking module

Parameters
btfParams
Returns

◆ DisableBodyTracking()

void DisableBodyTracking ( )
inline

disable the body tracking module

◆ RetrieveBodies()

FUSION_ERROR_CODE RetrieveBodies ( ref Bodies  bodies,
ref BodyTrackingFusionRuntimeParameters  rtparams,
CameraIdentifier  uuid 
)
inline

retrieves the body data, can be the fused data (default), or the raw data provided by a specific sender

Parameters
bodies
rtparams
uuid
Returns

◆ GetProcessMetrics()

FUSION_ERROR_CODE GetProcessMetrics ( ref FusionMetrics  metrics)
inline

gets the metrics of the Fusion process, for the fused data as well as individual camera provider data

Parameters
metrics
Returns

◆ EnablePositionalTracking()

FUSION_ERROR_CODE EnablePositionalTracking ( ref PositionalTrackingFusionParameters  ptfParams)
inline

enables positional tracking module

Parameters
ptfParams
Returns

◆ GetPosition()

POSITIONAL_TRACKING_STATE GetPosition ( ref Pose  pose,
REFERENCE_FRAME  referenceFrame,
UNIT  unit,
ref CameraIdentifier  uuid,
POSITION_TYPE  retrieveType 
)
inline

Gets the Fused Position of the camera system

Parameters
posecontains the camera pose in world position (world position is given by the calibration of the cameras system)
referenceFramedefines the reference from which you want the pose to be expressed. Default : REFERENCE_FRAME::WORLD.
coordinateSystem
unit
uuid
retrieveType
Returns

◆ GetFusedPositionalTrackingStatus()

FusedPositionalTrackingStatus GetFusedPositionalTrackingStatus ( )
inline

Gets the current status of fused position.

Returns
The current status of the tracking process.

◆ DisablePositionalTracking()

void DisablePositionalTracking ( )
inline

Disables the positional tracking

◆ IngestGNSSData()

void IngestGNSSData ( ref GNSSData  data)
inline

ingests GNSS data from an external sensor into the fusion module

Parameters
datathe current GNSS data to combine with the current positional tracking data

◆ GetCurrentGNSSData()

POSITIONAL_TRACKING_STATE GetCurrentGNSSData ( ref GNSSData  data)
inline

returns the current GNSS data

Parameters
datathe current GNSS data
Returns

◆ GetGeoPose()

GNSS_FUSION_STATUS GetGeoPose ( ref GeoPose  pose)
inline

returns the current GeoPose

Parameters
posethe current GeoPose
Returns

◆ GeoToCamera()

GNSS_FUSION_STATUS GeoToCamera ( ref LatLng  inLatLng,
out Pose  outPose 
)
inline

Converts latitude / longitude into position in sl::Fusion coordinate system.

Parameters
inLatLng
outPose
Returns

◆ CameraToGeo()

GNSS_FUSION_STATUS CameraToGeo ( ref Pose  inPose,
out GeoPose  outGeoPose 
)
inline

Converts a position in sl::Fusion coordinate system in real world coordinate.

Parameters
inPose
outGeoPose
Returns

◆ GetCurrentTimestamp()

ulong GetCurrentTimestamp ( )
inline

Gets the current timestamp.

Returns

◆ GetCurrentGNSSCalibrationStd()

GNSS_FUSION_STATUS GetCurrentGNSSCalibrationStd ( ref float  yawStd,
ref Vector3  positionStd 
)
inline

Get the current calibration uncertainty defined during calibration process

Parameters
yawStdyaw uncertainty
positionStdposition uncertainty
Returns

◆ GetGeoTrackingCalibration()

void GetGeoTrackingCalibration ( ref Vector3  position,
ref System.Numerics.Quaternion  rotation 
)
inline

Get the calibration found between VIO and GNSS

Parameters
positioncalibration found between VIO and GNSS (Translation)
rotationcalibration found between VIO and GNSS (Rotation)