DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Localization Fusion Interface

Detailed Description

Localization fusion module for HD maps.

The localization fusion module takes results from camera, radar, and lidar localization and provide a more robust and accurate result to localize the vehicle in an HD map.

Note
SW Release Applicability: These APIs are available in NVIDIA DRIVE Software releases.

Macros

#define DW_LOCALIZATION_FUSION_MAX_INPUT_COUNT   3
 

Typedefs

typedef struct dwLocalizationFusionObject * dwLocalizationFusionHandle_t
 Handle to a localization fusion module object. More...
 

Functions

DW_API_PUBLIC dwStatus dwLocalizationFusion_initialize (dwLocalizationFusionHandle_t *localizationFusion, uint32_t maxLocalizationResultsCount, const dwConstMapHandle_t map, dwContextHandle_t context)
 Create a new localization fusion module. More...
 
DW_API_PUBLIC dwStatus dwLocalizationFusion_localize (dwLocalizationResult *fusedResult, const dwLocalizationResult *localizationResults, size_t numResults, const dwTransformation3f *currToPrev, const dwEgomotionRelativeUncertainty *currToPrevUncertainty, dwTime_t timestamp, dwLocalizationFusionHandle_t localizationFusion)
 Update localization fusion model with new measurements If timestamp is identical to the previous timestamp, rerun localization. More...
 
DW_API_PUBLIC dwStatus dwLocalizationFusion_predictLocalization (dwLocalizationResult *predicted, const dwLocalizationResult *prev, const dwTransformation3f *predictedToPrev, const dwEgomotionRelativeUncertainty *predictedToPrevUncertainty, dwTime_t predictionTimestamp)
 Predict a localization result to a given timestamp using relative egomotion. More...
 
DW_API_PUBLIC dwStatus dwLocalizationFusion_release (dwLocalizationFusionHandle_t localizationFusion)
 Releases the localization fusion module. More...
 
DW_API_PUBLIC dwStatus dwLocalizationFusion_reset (dwLocalizationFusionHandle_t localizationFusion)
 Reset localization fusion state to default values. More...
 
DW_API_PUBLIC dwStatus dwLocalizationFusion_setMap (dwConstMapHandle_t map, dwLocalizationFusionHandle_t localizationFusion)
 Sets a new HD Map to localize to. More...
 

Macro Definition Documentation

◆ DW_LOCALIZATION_FUSION_MAX_INPUT_COUNT

#define DW_LOCALIZATION_FUSION_MAX_INPUT_COUNT   3

Definition at line 60 of file LocalizationFusion.h.

Typedef Documentation

◆ dwLocalizationFusionHandle_t

typedef struct dwLocalizationFusionObject* dwLocalizationFusionHandle_t

Handle to a localization fusion module object.

Definition at line 65 of file LocalizationFusion.h.

Function Documentation

◆ dwLocalizationFusion_initialize()

DW_API_PUBLIC dwStatus dwLocalizationFusion_initialize ( dwLocalizationFusionHandle_t localizationFusion,
uint32_t  maxLocalizationResultsCount,
const dwConstMapHandle_t  map,
dwContextHandle_t  context 
)

Create a new localization fusion module.

Parameters
[out]localizationFusionHandle to the localization module being initialized.
[in]maxLocalizationResultsCountThe maximum number of localization results to fuse.
[in]mapHandle to the maps module used for map data.
[in]contextHandle to the current driveworks context.
Returns
DW_INVALID_ARGUMENTS - if given arguments are invalid
DW_FAILURE - if localization could not be initialized
DW_SUCCESS

◆ dwLocalizationFusion_localize()

DW_API_PUBLIC dwStatus dwLocalizationFusion_localize ( dwLocalizationResult fusedResult,
const dwLocalizationResult localizationResults,
size_t  numResults,
const dwTransformation3f currToPrev,
const dwEgomotionRelativeUncertainty currToPrevUncertainty,
dwTime_t  timestamp,
dwLocalizationFusionHandle_t  localizationFusion 
)

Update localization fusion model with new measurements If timestamp is identical to the previous timestamp, rerun localization.

Parameters
[out]fusedResultFused localization result
[in]localizationResultsArray of results to be fused into localization fusion module state
[in]numResultsnumber of input localization results
[in]currToPrevThe relative transformation mapping the current frame's pose to the previous frame's pose. Previous denotes the timestamp of the last time dwLocalizationFusion_localize was called. If this is the first time calling dwLocalizationFusion_localize, the identity transformation is expected.
[in]currToPrevUncertaintyThe uncertainty of the relative transformation. If this is the first time calling dwLocalizationFusion_localize, any arbitrary uncertainty is accepted.
[in]timestampThe timestamp at which to fuse.
[in]localizationFusionHandle to the localization fusion module.
Returns
DW_INVALID_HANDLE - if given handle is invalid
DW_INVALID_ARGUMENTS - if given arguments are invalid
DW_OUT_OF_BOUNDS - if numResults greater than DW_LOCALIZATION_FUSION_MAX_INPUT_COUNT
DW_SUCCESS

◆ dwLocalizationFusion_predictLocalization()

DW_API_PUBLIC dwStatus dwLocalizationFusion_predictLocalization ( dwLocalizationResult predicted,
const dwLocalizationResult prev,
const dwTransformation3f predictedToPrev,
const dwEgomotionRelativeUncertainty predictedToPrevUncertainty,
dwTime_t  predictionTimestamp 
)

Predict a localization result to a given timestamp using relative egomotion.

This function is useful for fusing localization measurements at different timestamps.

Parameters
[out]predictedThe output predicted localization result.
[in]prevThe localization result to predict.
[in]predictedToPrevThe relative transformation mapping the prediction frame's pose to the old frame's pose.
[in]predictedToPrevUncertaintyThe uncertainty of the relative transformation.
[in]predictionTimestampThe timestamp to predict the localization result for. This timestamp must be greater than the timestamp in old.
Returns
DW_INVALID_ARGUMENTS - if given arguments are invalid
DW_SUCCESS

◆ dwLocalizationFusion_release()

DW_API_PUBLIC dwStatus dwLocalizationFusion_release ( dwLocalizationFusionHandle_t  localizationFusion)

Releases the localization fusion module.

Parameters
[in]localizationFusionHandle to the localization fusion module being released.
Returns
DW_INVALID_HANDLE - if given handle is an invalid handle
DW_INVALID_ARGUMENTS - if given handle is NULL DW_SUCCESS

◆ dwLocalizationFusion_reset()

DW_API_PUBLIC dwStatus dwLocalizationFusion_reset ( dwLocalizationFusionHandle_t  localizationFusion)

Reset localization fusion state to default values.

Parameters
[in]localizationFusionHandle to the localization fusion module.
Returns
DW_INVALID_HANDLE - if given handle is invalid
DW_SUCCESS

◆ dwLocalizationFusion_setMap()

DW_API_PUBLIC dwStatus dwLocalizationFusion_setMap ( dwConstMapHandle_t  map,
dwLocalizationFusionHandle_t  localizationFusion 
)

Sets a new HD Map to localize to.

The new map is assumed to have consistent road segment IDs with the old map.

Parameters
[in]mapHandle to the maps module used for map data.
[in]localizationFusionHandle to the localization fusion module.
Returns
DW_INVALID_HANDLE - if given handle is invalid
DW_SUCCESS