DriveWorks SDK Reference

| 0.6.67 Release

Map Tracker

Detailed Description

Keep track of the current lane.

The map tracker allows to robustly query the current lane. The map tracker is subsequently updated with the current pose, and can then be queried for the current lane. This is more robust than just requesting the closest lane, as it takes into account the angle relative to a lane and lane connections, discarding lanes that are close but cannot be accessed.

Typedefs

typedef struct dwMapTrackerObject const * dwConstMapTrackerHandle_t
 
typedef struct dwMapTrackerObject * dwMapTrackerHandle_t
 

Functions

DW_API_PUBLIC dwStatus dwMapTracker_getCurrentCandidateLanes (dwMapsLaneBuffer *lanes, dwConstMapTrackerHandle_t mapTrackerHandle)
 Get current lane candidates that have been used to find the current lane. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_getCurrentLane (const dwMapsLane **currentLane, dwConstMapTrackerHandle_t mapTrackerHandle)
 Get current lane that has been evaluated in the last update. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_initialize (dwMapTrackerHandle_t *mapTrackerHandle, dwConstMapHandle_t map)
 Creates a map tracker handle that allows to track a pose on a map. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_release (dwMapTrackerHandle_t *mapTrackerHandle)
 Release map tracker handle. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_updateCurrentPose (const dwMapsGeoPoint *position, const float64_t *localToENURotation33, dwTime_t timestamp, dwBool ignoreHeight, dwBool reset, dwMapTrackerHandle_t mapTrackerHandle)
 Update the tracker with the current pose. More...
 

Typedef Documentation

◆ dwConstMapTrackerHandle_t

typedef struct dwMapTrackerObject const* dwConstMapTrackerHandle_t

Definition at line 1268 of file Maps.h.

◆ dwMapTrackerHandle_t

typedef struct dwMapTrackerObject* dwMapTrackerHandle_t

Definition at line 1267 of file Maps.h.

Function Documentation

◆ dwMapTracker_getCurrentCandidateLanes()

DW_API_PUBLIC dwStatus dwMapTracker_getCurrentCandidateLanes ( dwMapsLaneBuffer lanes,
dwConstMapTrackerHandle_t  mapTrackerHandle 
)

Get current lane candidates that have been used to find the current lane.

Parameters
[out]lanesbuffer for lane candidates
[in]mapTrackerHandlemap tracker handle
Returns
DW_SUCCESS Successfully returned current lane candidates
DW_INVALID_ARGUMENT lanes is nullptr.
DW_BAD_CAST Could not successfully cast handle to map tracker object.

◆ dwMapTracker_getCurrentLane()

DW_API_PUBLIC dwStatus dwMapTracker_getCurrentLane ( const dwMapsLane **  currentLane,
dwConstMapTrackerHandle_t  mapTrackerHandle 
)

Get current lane that has been evaluated in the last update.

Parameters
[out]currentLaneClosest lane that has been found.
[in]mapTrackerHandlemap tracker handle
Returns
DW_SUCCESS Successfully returned current lane.
DW_INVALID_ARGUMENT currentLane is nullptr.
DW_BAD_CAST Could not successfully cast handle to map tracker object.

◆ dwMapTracker_initialize()

DW_API_PUBLIC dwStatus dwMapTracker_initialize ( dwMapTrackerHandle_t mapTrackerHandle,
dwConstMapHandle_t  map 
)

Creates a map tracker handle that allows to track a pose on a map.

This allows for a robust query of the current dwMapsLane.

Parameters
[out]mapTrackerHandlemapHandle to be initialized
[in]mapmap
Returns
DW_SUCCESS Map tracker handle is successfully initialized.
DW_INVALID_ARGUMENT mapTrackerHandle is nullptr.

◆ dwMapTracker_release()

DW_API_PUBLIC dwStatus dwMapTracker_release ( dwMapTrackerHandle_t mapTrackerHandle)

Release map tracker handle.

Parameters
[in,out]mapTrackerHandlemap tracker handle to be released
Returns
DW_SUCCESS Successfully released map tracker object and handle.
DW_BAD_CAST Could not successfully cast handle to map object.

◆ dwMapTracker_updateCurrentPose()

DW_API_PUBLIC dwStatus dwMapTracker_updateCurrentPose ( const dwMapsGeoPoint position,
const float64_t localToENURotation33,
dwTime_t  timestamp,
dwBool  ignoreHeight,
dwBool  reset,
dwMapTrackerHandle_t  mapTrackerHandle 
)

Update the tracker with the current pose.

This updates the dwMapsLane the current pose most likely belongs to. The pose is represented by a position and an orientation. The timestamp allows to compute a time difference since the last update and therefore restrict the lane candidates to lanes that can be reached from the previous pose in the given time difference. If the time difference is negative, there hasn't been a previous update, or the reset bool is set, the previous pose is ignored and a range search is executed around the current position to find the lane candidates. Also, if the distance from the current position to the closest point on the best candidate is too big, a range search is executed. This prevents the tracker from sticking to a wrong lane for too long in case of a wrong lane assignment.

From the lane candidates, the best lane is selected based on distance and angle to the current orientation.

Parameters
[in]positionCurrent position.
[in]localToENURotation33Current orientation. 3x3 Rotation matrix that transforms from local coordinate system (x: forward, y: left, z: up) into ENU local cartesian coordinate system with origin at point 'localOrigin' (x: east, y: north, z: up). z coordinate of ENU is the normal of the earth spheroid at point 'localOrigin'.
[in]timestampCurrent time in microseconds.
[in]ignoreHeightIf true, all points are projected onto height 0 before computing the distances.
[in]resetIgnore previous update and do a range search around current pose to get candidate lanes.
[in]mapTrackerHandlemap tracker handle
Returns
DW_SUCCESS Successfully released map tracker object and handle.
DW_BAD_CAST Could not successfully cast handle to map tracker object.