DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Porting Guide from SDK 2.0 to SDK 2.2

This document will help you port your applications from DriveWorks SDK 2.0 to DriveWorks SDK 2.2.


Maps

Geometry in the dwMaps module is now represented in local coordinates, rather than WGS84. The absGeometry in dwMapsLane, dwMapsLaneDivider and dwMapsFeature will be removed. The local coordinate system is defined by ENU space with origin at dwMapsRoadSegment::origin. For more information about the coordinate systems see maps_usecase6.

Depending on the HD Map source, the origin in the road segment might not be precise. However the the relative transformations dwMapsRoadSegmentConnection::connectedToLocal are always precise, such that the connected segments fit nicely together where they physically connect.

dwMapsRoadSegment::lanes has been marked as deprecated. dwMapsLaneGroup defines a group of lanes neighboring each other. Access of lanes should be done through a road segments lane groups (dwMapsRoadSegment::laneGroups).


Lane Planner

dwLanePlanActions now has 3 additional parameters:

  • hasLaneMerge: indicates whether the struct contains a valid lane merge
  • laneMerge: struct to describe the lane merge in detail
  • laneMergeDist: distance to point where the lanes merge

dwLanePlan_getLanePlanActions() with its signature from the version 2.0 is deprecated. dwLanePlan_getLanePlanActionsNew() contains an additional parameter "laneMergePointIndex" to describe at which point on the lane plan the next merge happens.

A new function dwLanePlan_updateCurrentPointWithCurrentRoadSegment() has been added. It does the same as dwLanePlan_updateCurrentPointWithLocalPose(), but the search for the current point is restricted to the reference road segment, for better performance. Use this function if it is known that the current pose is on the reference road segment.


IPC

This release adds support for finite time waiting when peeking, reading or writing data. This change requires a specific time span (timeout_us) during which the thread will block until data is available. Therefore, the following functions' signatures have been updated accordingly:

  • dwSocketConnection_peek() has been renamed to dwSocketConnection_peekNew(), and requires an additional argument of type dwTime_t indicating during which the thread will block waiting at most. Note that the unit of timeout_us is microseconds.
  • The old dwSocketConnection_peek() which performs infinite time waiting until data is available, can be replaced by dwSocketConnection_peekNew() with timeout_us specified as DW_TIMEOUT_INFINITE.
  • dwSocketConnection_peekNonBlock() has been marked as deprecated, and can be replaced by dwSocketConnection_peekNew() with timeout_us specified as zero.
  • dwSocketConnection_send() has been replaced by dwSocketConnection_write(). To achieve equivalent behavior dwSocketConnection_write() has to be called with DW_TIMEOUT_INFINITE for the timeout_us argument.
  • dwSocketConnection_recv() and dwSocketConnection_recvNonBlock() have been replaced with dwSocketConnection_read() which now accepts a timeout_us argument. To achieve same blocking behavior as in dwSocketConnection_recv() and non-blocking behavior as in dwSocketConnection_recvNonBlock() pass to dwSocketConnection_read() as timeout_us argument DW_TIMEOUT_INFINITE or 0 respectively.
Note
The old APIs and the New suffix for the new APIs will be removed in the next major release.

For more information see IPC.


Calibration

This release has updated the dwCalibrationState enum, deprecating the DW_CALIBRATION_STATE_STOPPED and DW_CALIBRATION_STATE_STARTED values. Please use dwCalibrationStatus::started instead.

This release has deprecated dwCalibrationEngine_addLidarPoses API. The method is extended with a second timestamp and is replaced by dwCalibrationEngine_addLidarPose.

This release adapts and clarifies the --use-checkerboard parameter semantics of the calibration-intrinsics-constraints tool to indicate the actual checkerboard pattern grid dimension (before, this was the dimension of inner pattern corners).


Egomotion

This release has deprecated the dwEgomotion_applyRelativeUncertainty API. Please use the dwEgomotion_computeRelativeTransformation API for the computing the uncertainty of a relative motion estimate, and the estimates available in dwEgomotionUncertainty for the uncertainty of the corresponding fields in dwEgomotionResult.

This release has deprecated the estimationPeriod parameter in dwEgomotionParameters. Use the automaticUpdate parameter going forward.

This release has deprecated the dwEgomotionState_getHistoryEntry API. Use the dwEgomotionState_getHistoryElement API going forward. The timestamp is now available as part of dwEgomotionResult and dwEgomotionUncertainty.

This release announces the upcoming deprecation of the GPS-dependent APIs and estimates in dwEgomotion, which will be gradually deprecated and removed in future releases. Going forward, please use the dwGlobalEgomotion module if global position and orientation estimates are required.

This release adds a suspension model used to compensate for vehicle body rotation due to acceleration and resulting rotational suspension effects. See dwEgomotionSuspensionParameters.


dwMapNet

This release has deprecated the dwMapNet_initDefaultParams API. please use dwMapNet_initDefaultParamsNew to initialize parameters for MapNet.


LandmarkPerception

Landmark enums are now consolidated under LandmarkTypes.h and dwLaneMarkType has been moved to that file. LandmarkDetector and LaneDetector both refer to the new LandmarkTypes.h file.

This release changes the struct of dwLaneDetection, and extends it with a member dwTime_t to indicate the timestamp of frame used for detection.

This release has deprecated the dwLandmarkDetector_initializeDefaultParams API. Please use dwLandmarkDetector_initializeDefaultParamsNew for initializing landmark detector parameters.

This release has deprecated the dwLandmarkDetector_detectLandmarks API as well as the dwLandmarkDetectorOutput struct. Please use dwLandmarkDetector_detectLandmarksNew to detect landmarks.

This release has deprecated the dwLandmarkDetector_setDetectionROI API. Please set ROI with dwLandmarkDetectorParams. This release has deprecated the dwLandmarkDetector_setDetectionThreshold API. Please set thresholds with dwLandmarkDetectorParams. This release has deprecated the dwLandmarkDetector_setModelParameterFitting API. Please set model parameter fitting with dwLandmarkDetectorParams.

This release has deprecated the dwLandmarkDetector_setTemporalSmoothFactor API. Note This API currently has no functionality. This release has deprecated the dwLandmarkDetector_getTemporalSmoothFactor API. Note This API currently has no functionality.


Freespace Perception

In this release, the major change for freespace perception module is to enable per camera setting change for the batched camera frames. Specifically, the static camera parameters can be initialized via dwFreespaceDetector_initializeFromOpenRoadNet_new. The runtime per camera parameters such as camera extrinsics, maximum boundary distance, and ROI can be set separately with the camera index in the batch. These are the new initialization struct variables and per camera set/get APIs:

  • dwFreespaceDetectorInitParams.cam_new[]
  • dwFreespaceDetectorInitParams.roi[]
  • dwFreespaceDetectorInitParams.maxDistance[]
  • dwFreespaceDetector_setCameraExtrinsics_new
  • dwFreespaceDetector_setMaxFreespaceDistance_new
  • dwFreespaceDetector_setDetectionROI_new
  • dwFreespaceDetector_getDetectionROI_new

The existing struct variables and APIs are deprecated:

  • dwFreespaceDetectorInitParams.cam
  • dwFreespaceDetectorInitParams.maxNumImages
  • dwFreespaceDetector_setCameraExtrinsics
  • dwFreespaceDetector_setMaxFreespaceDistance
  • dwFreespaceDetector_setDetectionROI
  • dwFreespaceDetector_getDetectionROI

Point Cloud Processing

This release deprecates KDtree based ICP type (DW_POINT_CLOUD_ICP_TYPE_KD_TREE) in dwPointCloudICPType struct. There is no replacement for quasi unstructured point clouds available in this release. Please switch to structured DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP depthmap based ICP type.

This release has extended dwPointCloud structure with a member indicating point format. Currently XYZI and RTHI are supported. xyzi pointer is declared deprecated. When creating a buffer it is initialized only if point format is XYZI. Otherwise it is set to nullptr and the user should use points instead.

Stitcher API has been modified in this release. dwPointCloudStitcher_setMotionCompensation is declared deprecated. Instead the following functions added:

  • dwPointCloudStitcher_enableMotionCompensation
  • dwPointCloudStitcher_disableMotionCompensation
  • dwPointCloudStitcher_setGlobalTransformation

dwPointCloudAccumulator API has been changed in the following way:

  • dwPointCloudAccumulator_bindInput is declared deprecated. It is recommended to use dwPointCloudAccumulator_addLidarPacket instead.
  • dwPointCloudAccumulator_isReady is added returning a flag indicating when full spin has been collected.

Lidar Accumulator

dwLidarAccumulator is declared deprecated and corresponding sample has been removed. dwPointCloudAccumulator should be used instead.


SoftISP

This release changes the struct of SoftISP paramters, and removes the inclusion of dwCameraProperties within that struct.


BlindnessDetector

This release deprecates motion based (KLT feature based) blindness detection as a method for the BlindnessDetector module. Going forward, ClearSightNet DNN based blindness detetion will be the only availabe method. As part of this change, the following functions are deprecated:

  • dwBlindnessDetector_initMotionBasedDefaultParams()
  • dwBlindnessDetector_detectWithDNN()
  • dwBlindnessDetector_detectWithMotion().

In addition, the following data elements and structures are deprecated:

  • dwBlindnessDetectionType enum
  • maskCPU and maskCPUsegmented variables in dwBlindnessDetectionOutput struct
  • method, imageWidth, imageHeight, blockX, blockY, historyCapacity, maxFeatureCount, useSkyPrior and blindnessThreshold variables in dwBlindnessDetectorParams struct

In order to remove the use of deprecated API elements in your application that uses ClearSightNet DNN for blindness detection, you need to make the following changes:

  • change use of dwBlindnessDetector_detectWithDNN() to dwBlindnessDetector_detect()
  • remove any instances where method member of any object of dwBlindnessDetectionParams struct is set to DW_BLINDNESSDETECTION_CLEARSIGHTNET

For revised details of ClearSightNet based blindness detection, please refer to clearsightnet_usecase1. In addition, please retire any usage of motion based blindness detection from your application. ClearSightNet based blindness detection offers faster performance and much better accuracy.


dwSensorSeekTable

This release generalizes the seek table API to all sensors

Note
Deprecated functions, enums and struct variables will be removed in the next major release.

Objects

details field of dwObjectCamera, dwObjectRadar and dwObjectFused is deprecated. The type dwObjectGeneric will be deprecated and removed in the upcoming releases in favor of dwObstacle, further use of dwObjectGeneric is discouraged.


dwDriveNet

This release add a new enum dwDriveNetCameraType to dwDriveNetParams specify the type camera with different fields of view. This is essential to make sure depth output for objects from drivenet is properly scaled.

  • DW_DRIVENET_CAMERA_60FOV for 60 degree field of view camera
  • DW_DRIVENET_CAMERA_120FOV for 120 degree field of view camera
  • DW_DRIVENET_CAMERA_30FOV for 30 degree field of view camera

The parameter hasDepth is deprecated and it is replaced with hasObjectDepth.

This release adds a new value hasObjectUrgency to dwDriveNetParams. This value indicates to load a network that outputs urgency for detected objects.

This release adds a new value hasUrgency to dwDriveNetClassProperties to indicate whether a valid urgency is provided for a given object class.

This release adds two new temporal models, DW_STATEFUL_TEMPORAL_DRIVENET_MODEL and DW_STATELESS_TEMPORAL_DRIVENET_MODEL, to enum dwDriveNetModel. These two models can predict temporal information such as urgency, which equals to the inverse of time to collision (TTC).


dwObjectDetector

This release addes a new API, dwObjectDetector_isObjectUrgencyEnabled, to indicate whether urgency output is enabled.

The API dwObjectDetector_isDistanceEnabled is deprecated and it is replaced with dwObjectDetector_isObjectDepthEnabled.


Vehicle IO

This release adds support for AEB signals including a heartbeat as an alive counter, a request to activate automatic emergency braking (AEB), a request to activate a forward collision warning (FCW), and system status/state information for these respective monitoring systems. This change is designed to support external consumption of AEB and FCW requests.

Following member variables in struct dwVehicleIOCommand were deprecated and scheduled to be removed in the next major version:

  • throttlePercent
  • brakePercent
  • brakeTorque

dwWaitConditions

  • dwWaitConditionsDetector_initializeFromWaitNet() is deprecated. The alternate API is dwWaitConditionsDetector_initializeFromWaitNetNew()
  • dwWaitConditionsDetector_getDetectedIntersection() is deprecated. The detected output can be fetched by access input to dwWaitConditionsDetector_bindOutput()
  • filterMultipleObject is added to dwWaitConditionsDetectorTemporalAnalysisParams. Should turn on when detecting multiple intersections.
  • dwTemporalAnalysis_getTrackID() is added in temporal analysis model. Temporal analysis model now hold a track ID.
  • dwTemporalAnalysis_reset() is added in temporal analysis model. It cleans up all the history.

dwCANMessage

dwCANMessage structure has changed size to accommodate large CAN FD message types.

This has resulted in a number of log files changing their internal data structure. This update handled automatically in most applications but some old files may need to be updated if the application make assumptions that the file contains structures size sizeof(dwCANMessages).

An example of this is in the samples/sensors/plugins directory. These samples will not work on old sensor recording and those recording will need to be updated with CAN Recording Update Tool.