DriveWorks SDK Reference

| 0.6.67 Release

Calibration

Detailed Description

Defines the Calibration module for performing calibration of sensors.

Modules

 Calibration Types
 Fundamental types associated with Calibration.
 
 Camera Calibration
 Parameters for initializing a camera calibration.
 

Macros

#define DW_CALIBRATION_MAXSENSORS   5
 This defines the number of sensors anticipated to be calibrated. More...
 

Typedefs

typedef struct dwCalibrationEngineObject * dwCalibrationEngineHandle_t
 Handle to a calibration module object. More...
 

Functions

DW_API_PUBLIC dwStatus dwCalibrationEngine_addLaneDetections (const dwLaneDetection *lanes, dwTime_t timestamp, uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_getCalibrationStatus (dwCalibrationStatus *status, uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 Returns the current status of a calibration. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_getNumberOfSensors (uint32_t *count, dwCalibrationEngineHandle_t engine)
 Gets the number of sensors which are being tracked for calibration. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_getPercentageComplete (float32_t *percentage, uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 Returns the current calibration percentage complete. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_getSensorToRigTransformation (dwTransformation *sensorToRig, uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 Returns the current transform. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_initialize (dwCalibrationEngineHandle_t *engine, dwRigConfigurationHandle_t rigConfigHandle, dwContextHandle_t context)
 Creates and initializes a Calibration Engine module This method initializes the Calibration Engine. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_initializeCamera (uint32_t sensorIndex, const dwCalibrationCameraParams *params, dwEgomotionHandle_t egoMotion, dwCalibrationEngineHandle_t engine)
 This method initializes a camera calibration routine designated by the sensor index sent into the method. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_release (dwCalibrationEngineHandle_t *engine)
 Releases the Calibration Engine module. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_reset (dwCalibrationEngineHandle_t engine)
 Resets the Calibration Engine module. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_resetCalibration (uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 Resets the calibration of a specific sensor designated by the index. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_startCalibration (uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 Starts a calibration routine on the sensor indicated in the calibration params. More...
 
DW_API_PUBLIC dwStatus dwCalibrationEngine_stopCalibration (uint32_t sensorIndex, dwCalibrationEngineHandle_t engine)
 Stops the calibration of a specific sensor designated by the index. More...
 

Macro Definition Documentation

◆ DW_CALIBRATION_MAXSENSORS

#define DW_CALIBRATION_MAXSENSORS   5

This defines the number of sensors anticipated to be calibrated.

Definition at line 62 of file CalibrationEngine.h.

Typedef Documentation

◆ dwCalibrationEngineHandle_t

typedef struct dwCalibrationEngineObject* dwCalibrationEngineHandle_t

Handle to a calibration module object.

Definition at line 67 of file CalibrationEngine.h.

Function Documentation

◆ dwCalibrationEngine_addLaneDetections()

DW_API_PUBLIC dwStatus dwCalibrationEngine_addLaneDetections ( const dwLaneDetection lanes,
dwTime_t  timestamp,
uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)
Parameters
[in]lanesThe lane detections that were calculated from the sensor
[in]timestampThe time stamp when the lane detections were created
[in]sensorIndexThe index of the sensor that created the lane detections
[in]engineSpecifies the calibration engine module we are checking against
Note
only routines that require the lane detection from this sensor as part of their calibration routine will process the lane detection
Returns
DW_INVALID_ARGUMENT - if the lanes pointer is invalid
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_INTERNAL_ERROR - an internal error indicating unrecoverable error, in general this should not happen
DW_SUCCESS

◆ dwCalibrationEngine_getCalibrationStatus()

DW_API_PUBLIC dwStatus dwCalibrationEngine_getCalibrationStatus ( dwCalibrationStatus status,
uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)

Returns the current status of a calibration.

Parameters
[out]statusA pointer to the returned status
[in]sensorIndexSpecifies the index of the sensor we are interested in
[in]engineSpecifies the calibration engine module we are checking against
Returns
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_INVALID_ARGUMENT - if provided status pointer is invalid or the calibration module is not currently calibrating this sensor
DW_SUCCESS

◆ dwCalibrationEngine_getNumberOfSensors()

DW_API_PUBLIC dwStatus dwCalibrationEngine_getNumberOfSensors ( uint32_t *  count,
dwCalibrationEngineHandle_t  engine 
)

Gets the number of sensors which are being tracked for calibration.

Parameters
[out]countA pointer to return number of routines current in progress.
[in]engineSpecifies the calibration engine module we are checking against
Returns
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_INVALID_ARGUMENT - if the provided count pointer is invalid
DW_SUCCESS

◆ dwCalibrationEngine_getPercentageComplete()

DW_API_PUBLIC dwStatus dwCalibrationEngine_getPercentageComplete ( float32_t percentage,
uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)

Returns the current calibration percentage complete.

Parameters
[out]percentageA pointer to the returned percentage in the range [0,1]
[in]sensorIndexSpecifies the index of the sensor we are interested in
[in]engineSpecifies the calibration engine module we are checking against
Returns
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_INVALID_ARGUMENT - if provided status pointer is invalid or the calibration module is not currently calibrating this sensor
DW_SUCCESS

◆ dwCalibrationEngine_getSensorToRigTransformation()

DW_API_PUBLIC dwStatus dwCalibrationEngine_getSensorToRigTransformation ( dwTransformation *  sensorToRig,
uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)

Returns the current transform.

Parameters
[out]sensorToRigA pointer to the return transform. The transform represents the extrinsic transformation to go from the sensor to the rig
[in]sensorIndexSpecifies the index of the sensor we are interested in
[in]engineSpecifies the calibration engine module we are checking against
Returns
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_INVALID_ARGUMENT - if provided transform pointer is invalid or the calibration module is not tracking this sensor
DW_SUCCESS

◆ dwCalibrationEngine_initialize()

DW_API_PUBLIC dwStatus dwCalibrationEngine_initialize ( dwCalibrationEngineHandle_t engine,
dwRigConfigurationHandle_t  rigConfigHandle,
dwContextHandle_t  context 
)

Creates and initializes a Calibration Engine module This method initializes the Calibration Engine.

Parameters
[out]engineA pointer to the calibration engine handle will be returned here
[in]rigConfigHandleSpecifies the rig configuration module that holds the sensor information
[in]contextSpecifies the handle to the context under which the Calibration module is created
Note
The rig configuration handle must remain valid until the calibration module has been released
Returns
DW_INVALID_ARGUMENT - if pointer to the engine handle is invalid
DW_INVALID_HANDLE - if provided context handle is invalid
DW_SUCCESS

◆ dwCalibrationEngine_initializeCamera()

DW_API_PUBLIC dwStatus dwCalibrationEngine_initializeCamera ( uint32_t  sensorIndex,
const dwCalibrationCameraParams params,
dwEgomotionHandle_t  egoMotion,
dwCalibrationEngineHandle_t  engine 
)

This method initializes a camera calibration routine designated by the sensor index sent into the method.

Parameters
[out]sensorIndexThe index of the sensor we are creating a calibration for. This should be the same as the number in the rig configuration module
[in]paramsSpecifies the parameters that are used to in calibrating the camera
[in]egoMotionSpecifies the ego motion module that holds the motion of the vehicle
[in]engineA pointer to the the calibration engine handle that owns the sensor
Note
The ego motion object sent into this method should be based off IMU & Odometry and the handle must remain valid until the calibration module has been released
Returns
DW_INVALID_ARGUMENT - if the arguments in the parameters are invalid
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_BUFFER_FULL - if the number of sensors need to be calibrated exceeds DW_CALIBRATION_MAXSENSORS value
DW_SUCCESS

◆ dwCalibrationEngine_release()

DW_API_PUBLIC dwStatus dwCalibrationEngine_release ( dwCalibrationEngineHandle_t engine)

Releases the Calibration Engine module.

This method stops all calibrations that are in process

Note
This method renders the engine handle unusable
Parameters
[in]engineA pointer to the the calibration engine handle to be released
Returns
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_SUCCESS

◆ dwCalibrationEngine_reset()

DW_API_PUBLIC dwStatus dwCalibrationEngine_reset ( dwCalibrationEngineHandle_t  engine)

Resets the Calibration Engine module.

This method resets all calibrations that are being calculated by the module

Parameters
[in]engineSpecifies the calibration engine handle to reset
Returns
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_SUCCESS

◆ dwCalibrationEngine_resetCalibration()

DW_API_PUBLIC dwStatus dwCalibrationEngine_resetCalibration ( uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)

Resets the calibration of a specific sensor designated by the index.

Note
If you reset the calibration of a sensor it will revert to baseline calibration from the rig configuration vice any previous calibration data that might have been saved
Parameters
[in]sensorIndexSpecifies the index of the sensor to reset calibrating
[in]engineSpecifies the handle to the Calibration Engine module that is managing the calibration
Returns
DW_INVALID_ARGUMENT - if the sensor index is not being tracked by the module
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_SUCCESS

◆ dwCalibrationEngine_startCalibration()

DW_API_PUBLIC dwStatus dwCalibrationEngine_startCalibration ( uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)

Starts a calibration routine on the sensor indicated in the calibration params.

Parameters
[in]sensorIndexSpecifies the index of the sensor to start calibrating
[in]engineSpecifies the handle to the Calibration Engine that will manage the calibration
Returns
DW_INVALID_ARGUMENT - if the arguments in the parameters are invalid
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_SUCCESS

◆ dwCalibrationEngine_stopCalibration()

DW_API_PUBLIC dwStatus dwCalibrationEngine_stopCalibration ( uint32_t  sensorIndex,
dwCalibrationEngineHandle_t  engine 
)

Stops the calibration of a specific sensor designated by the index.

Parameters
[in]sensorIndexSpecifies the index of the sensor to stop calibrating
[in]engineSpecifies the handle to the Calibration Engine module that is managing the calibration
Returns
DW_INVALID_ARGUMENT - if the sensor index is not being tracked by the module
DW_INVALID_HANDLE - if provided engine handle is invalid
DW_SUCCESS