31 #ifndef DW_MAPS_MAPS_H__ 32 #define DW_MAPS_MAPS_H__ 52 #include <dw/core/Config.h> 298 #define DW_MAPS_MAX_LANE_CONNECTIONS 100 646 const char *filename,
669 const char *HEREMapCacheFile,
671 uint32_t maxRoadSegmentCount,
694 uint32_t maxRoadSegmentCount,
731 dwMapHandle_t mapHandle);
760 dwConstMapHandle_t mapHandle);
875 uint32_t polylineCount,
943 uint32_t *targetEndIndex,
946 uint32_t srcPointCount,
948 uint32_t targetPointCount,
953 void *interpolationFnContext);
976 uint32_t *laneCountAccessible,
978 dwBool sideRelativeToDrivingDirection);
1004 dwBool sideRelativeToDrivingDirection);
1048 dwBool ignoreLaneDirection);
1171 uint32_t typeFilter,
1173 dwConstMapHandle_t mapHandle);
1196 uint32_t typeFilter,
1198 dwConstMapHandle_t mapHandle);
1220 dwConstMapHandle_t mapHandle);
1245 dwConstMapHandle_t mapHandle);
1337 dwMapTrackerHandle_t mapTrackerHandle);
1352 dwConstMapTrackerHandle_t mapTrackerHandle);
1367 dwConstMapTrackerHandle_t mapTrackerHandle);
1441 uint32_t maxLaneCount,
1442 dwConstMapHandle_t map);
1479 dwBool doLaneChanges, dwMapsLaneTreeHandle_t laneTree);
1499 dwConstMapsLaneTreeHandle_t laneTree);
1530 dwConstMapsLaneTreeHandle_t laneTree);
1571 #endif // DW_MAPS_MAPS_H__ dwMapsRoadSegmentId segmentId
id of the connected road segment.
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.
Road feature defined by a polyline, with attributes.
DW_API_PUBLIC dwStatus dwMaps_computeDistance(float32_t *distance, const dwMapsGeoPoint *p1, const dwMapsGeoPoint *p2)
Compute Euclidean distance bewteen two points.
dwMapsGeoPolyline geometry
polyline defining the geometry of the lane divider
uint32_t maxSize
maximum number of lane dividers that fit into the buffer
DW_API_PUBLIC dwStatus dwMaps_computeLocalToENU(dwMatrix3d *localToENURotation33, float32_t bearingRadian)
Create a rotation matrix that transfroms from a local coordinate system with x-axis pointing towards ...
struct dwMapTrackerObject * dwMapTrackerHandle_t
const dwMapsLaneDividerGroup * laneDividerGroups
pointer to lane divider group array of this segment
DW_API_PUBLIC dwStatus dwMaps_getRoadSegments(dwMapsRoadSegmentBuffer *roadSegments, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get road segments within bounds.
User provided buffer of dwPolyline3f.
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwMapsLaneTree_release(dwMapsLaneTreeHandle_t *laneTreeHandle)
Release lane tree handle.
uint32_t previousCount
number of segment connections at segment start
float float32_t
Specifies POD types.
const dwMapsRoadSegment * roadSegment
parent road segment
DW_API_PUBLIC dwStatus dwMaps_computePolylineLength(float32_t *length, const dwMapsGeoPoint *points, uint32_t pointCount)
Compute length of a polyline of wgs84 points in meters.
Polyline defined by a dwMapsGeoPoint list.
DW_API_PUBLIC dwStatus dwMaps_transformRoadFeaturesToLocalSpace(dwMapsPolyline3fBuffer *localPolylines, dwMapsPointBuffer *pointBuffer, const dwMapsFeatureBuffer *features, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33, const dwMapsLocalBounds *localBounds)
Get geometry from the list of specified road features, transformed into a local cartesian coordinate ...
Lane defined by a polyline, with lane attributes.
DW_API_PUBLIC dwStatus dwMaps_serialize(const char *filename, dwMapsSerializationFormat format, dwConstMapHandle_t mapHandle)
Stores current map content into a file.
uint32_t laneDividerGroupCount
number of lane divider groups in this segment
const char * appCode
appCode for access authorization
uint32_t size
current number of valid road segments in the buffer
Group of lane dividers, representing one boundary of a lane.
dwMapsGeoPoint * buffer
pointer to point buffer
uint32_t nextCount
number of lane connections at lane end
dwMapsFeature * buffer
pointer to feature buffer
uint32_t laneCount
number of lanes in this segment
DW_API_PUBLIC dwStatus dwMaps_deserialize(const char *filename, dwMapHandle_t mapHandle)
Loads map data from file into the map.
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLeafCount(uint32_t *leafCount, dwConstMapsLaneTreeHandle_t laneTree)
dwMapsLaneTree_getLeafCount
Defines a three-element floating-point vector.
DW_API_PUBLIC dwStatus dwMaps_transformLaneDividersToLocalLines(dwMapsLaneDividerLineBuffer *lineSegments, const dwMapsLaneDividerBuffer *laneDividers, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33, const dwMapsLocalBounds *bounds, const dwVector3f *directionFilterVector, float32_t directionFilterAngleRadian, dwBool ignoreLaneDirection)
Get line segments from the list of specified dividers, transformed into a local cartesian coordinate ...
const dwMapsLane * lanes
pointer to lane array of this segment
uint32_t maxSize
maximum number of nodes that fit into the buffer
const dwMapsRoadSegmentConnection * next
pointer to road segment connections at segment end
const char * liveRoadsCatalog
live roads catalog name
User provided buffer of dwMapsLines.
uint32_t maxSize
maximum number of lanes that fit into the buffer
uint32_t size
current number of valid features in the buffer
dwMapsLaneType type
lane type
dwMapsColor color
lane divider color
dwMapsLaneTreeLimit
Enum to select the lane tree limit type.
dwMapsLaneDividerGroupId id
global id of the group
dwMapsDirection drivingDirection
driving direction compared to geometry polyline order
Global identifier for lanes.
uint64_t dwTime_t
Specifies a timestamp unit, in microseconds.
DW_API_PUBLIC dwStatus dwMaps_getNeighborLaneCount(uint32_t *laneCount, uint32_t *laneCountAccessible, const dwMapsLane *lane, dwMapsSide side, dwBool sideRelativeToDrivingDirection)
Get the number of lanes on the current road segment next to a given lane.
uint32_t type
type of a feature
User provided buffer of dwVector3f.
NVIDIA DriveWorks API: Core Methods
struct dwMapObject * dwMapHandle_t
User provided buffer of dwMapsGeoPoint.
const dwMapsLaneConnection * previous
pointer to lane connections at lane start
DW_API_PUBLIC dwStatus dwMaps_getFeatures(dwMapsFeatureBuffer *features, uint32_t typeFilter, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get features within bounds.
uint32_t featureCount
number of features in this segment
dwMapsMaterial material
lane divider material
uint32_t maxSize
maximum number of points that fit into the buffer
const dwMapsLaneDivider * laneDividers
pointer to lane divider array
float64_t height
height above WGS84 earth spheroid
NVIDIA DriveWorks API: Core Exports
dwMapsRoadSegmentType
Road segment types.
uint32_t size
current number of valid points in the buffer
const char * appId
appId for access authorization
dwMapsLaneId id
global id of the lane
uint64_t id
unique id of a feature
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLaneListToLeaf(dwMapsLaneBuffer *laneBuffer, uint32_t leafIndex, dwConstMapsLaneTreeHandle_t laneTree)
Get the list of lanes that connect the root lane to a leaf.
uint32_t maxSize
maximum number of points that fit into the buffer
uint32_t size
current number of valid lanes in the buffer
uint32_t maxSize
maximum number of features that fit into the buffer
dwStatus
Status definition.
User provided buffer of dwMapsRoadSegments.
DW_API_PUBLIC dwStatus dwMaps_computeBounds(dwMapsBounds *bounds, const dwMapsGeoPoint *p, float32_t radiusMeter)
Compute WGS84 query bounds from position and radius in meters.
dwMapsLaneDividerType type
lane divider type
DW_API_PUBLIC dwStatus dwMapsLaneTree_get(dwMapsLaneTreeNode **root, dwMapsLaneTreeNodeBuffer *laneTreeNodes, dwConstMapsLaneTreeHandle_t laneTree)
Get the created lane tree.
DW_API_PUBLIC dwStatus dwMapTracker_getCurrentLane(const dwMapsLane **currentLane, dwConstMapTrackerHandle_t mapTrackerHandle)
Get current lane that has been evaluated in the last update.
uint32_t maxSize
maximum number of road segments that fit into the buffer
DW_API_PUBLIC dwStatus dwMapTracker_release(dwMapTrackerHandle_t *mapTrackerHandle)
Release map tracker handle.
const dwMapsRoadSegment * roadSegment
parent road segment
DW_API_PUBLIC dwStatus dwMaps_transformPolylines(dwMapsPointBuffer *transformedPoints, const dwMapsGeoPolyline *polylines, uint32_t polylineCount, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33)
Transform polylines into points in a local coordinate system defined by position 'localOrigin' and ro...
dwMapsSide
Enum for sides.
dwMapsRoadSegment * buffer
pointer to road segment buffer
dwPolyline3f * buffer
pointer to polyline buffer
DW_API_PUBLIC dwStatus dwMaps_getClosestLane(const dwMapsLane **closestLane, dwMapsGeoPoint *closestPoint, const dwMapsGeoPoint *p, dwBool onlyDrivable, dwBool ignoreHeight, dwConstMapHandle_t mapHandle)
Get closest lane in the map.
dwMapsMaterial
Material type values.
dwMapsSerializationFormat
Serialization formats.
const dwMapsLane * lane
pointer to the connected lane.
dwMapsLaneGeometry
Enum for selection of lane geometry.
User provided buffer of dwMapsFeatures.
const char * baseURL
URL of HERE database.
dwMapsLaneTreeNode * buffer
pointer to node buffer
const dwMapsRoadSegment * roadSegment
parent road segment
dwMapsFeatureType
Feature types.
struct dwMapTrackerObject const * dwConstMapTrackerHandle_t
const char * staticMapCatalog
static map catalog name
Global identifier for road segments.
dwVector3f * buffer
pointer to point buffer
Lane divider line defined by two points and the owner of a line.
uint32_t size
current number of valid nodes in the buffer
struct dwMapsLaneTreeObject * dwMapsLaneTreeHandle_t
Defines a 3x3 matrix of double floating point numbers.
DW_API_PUBLIC dwStatus dwMaps_getNeighborLane(const dwMapsLane **otherLane, const dwMapsLane *currentLane, dwMapsSide side, uint32_t offset, dwBool sideRelativeToDrivingDirection)
Get a neighbor lane on a given side.
const dwMapsLaneConnection * next
pointer to lane connections at lane end
DW_API_PUBLIC dwStatus dwMaps_interpolatePolylines(uint32_t *srcStartIndex, uint32_t *targetEndIndex, dwMapsGeoPointBuffer *interpolatedPoints, const dwMapsGeoPoint *srcPoints, uint32_t srcPointCount, const dwMapsGeoPoint *targetPoints, uint32_t targetPointCount, float32_t start, float32_t end, float32_t stepSize, float32_t(*interpolationFn)(float32_t, void *), void *interpolationFnContext)
Interpolate between 2 polylines.
User provided buffer of dwMapsLaneDividers.
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.
DW_API_PUBLIC dwStatus dwMapTracker_getCurrentCandidateLanes(dwMapsLaneBuffer *lanes, dwConstMapTrackerHandle_t mapTrackerHandle)
Get current lane candidates that have been used to find the current lane.
uint32_t size
current number of valid points in the buffer
const dwMapsLaneDividerGroup * group
parent lane divider group
uint32_t laneDividerCount
number of lane dividers in group
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLaneCount(uint32_t *laneCount, dwConstMapsLaneTreeHandle_t laneTree)
Get total number of lanes in the lane tree.
uint32_t pointCount
number of points defining the polyline
const dwMapsLane * lane
lane
DW_API_PUBLIC dwStatus dwMaps_release(dwMapHandle_t *mapHandle)
Release map handle.
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLanes(dwMapsLaneBuffer *laneBuffer, dwConstMapsLaneTreeHandle_t laneTree)
Get all lanes in lane tree.
dwMapsLaneDividerType
Lane divider type and filter values.
uint32_t previousCount
number of lane connections at lane start
struct dwContextObject * dwContextHandle_t
Context handle.
uint32_t childrenCount
size of children node array
dwMapsGeoPolyline geometry
set of points representing a feature
dwMapsLaneType
Lane types.
Point defined by WGS84 coordinates.
const dwMapsLaneDivider * divider
owner of a line
User provided buffer of dwMapsLaneTreeNode.
DW_API_PUBLIC dwStatus dwMaps_update(dwBool *updated, const dwMapsBounds *bounds, dwBool download, dwMapHandle_t mapHandle)
Updates map cache with map data within given bounds.
struct dwMapObject const * dwConstMapHandle_t
uint32_t nextCount
number of segment connections at segment end
dwMapsLaneDividerLine * buffer
pointer to line buffer
DW_API_PUBLIC dwStatus dwMaps_initializeTomTom(dwMapHandle_t *mapHandle, const char *file, uint32_t maxRoadSegmentCount, dwContextHandle_t contextHandle)
Creates a map handle for TomTom maps data.
Global identifier for lane divider groups.
dwMapsLaneId laneId
id of the connected lane.
User provided buffer of dwMapsLane.
const dwMapsRoadSegment * segment
pointer to the connected road segment.
uint32_t size
current number of valid polylines in the buffer
uint32_t type
road segment type
Lane divider defined by a polyline, with type, material and color information.
DW_API_PUBLIC dwStatus dwMaps_transformPoint(dwVector3f *transformedPoint, const dwMapsGeoPoint *point, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33)
Transform a WGS84 point into a point in a local coordinate system defined by position 'localOrigin' a...
dwMapsGeoPolyline geometry
polyline for lane centerline
DW_API_PUBLIC dwStatus dwMaps_initializeHERE(dwMapHandle_t *mapHandle, const dwMapsHEREConnectionParameters *params, const char *HEREMapCacheFile, float32_t splinePointSpacing, uint32_t maxRoadSegmentCount, dwContextHandle_t contextHandle)
Creates a map handle for HERE maps data.
uint32_t maxSize
maximum number of lines that fit into the buffer
uint32_t size
current number of valid lines in the buffer
DW_API_PUBLIC dwStatus dwMaps_getLaneDividers(dwMapsLaneDividerBuffer *laneDividers, uint32_t typeFilter, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get lane dividers within bounds.
uint32_t maxSize
maximum number of polylines that fit into the buffer
uint32_t size
current number of valid lane dividers in the buffer
Connection parameters to HERE database.
Line defined by 2 points in user defined coordinates.
const dwMapsFeature * features
pointer to features of this segment
struct dwMapsLaneTreeObject const * dwConstMapsLaneTreeHandle_t
dwMapsRoadSegmentId id
global id of the road segment
DW_API_PUBLIC dwStatus dwMapsLaneTree_initialize(dwMapsLaneTreeHandle_t *laneTreeHandle, uint32_t maxLaneCount, dwConstMapHandle_t map)
Creates a lane tree object that allows to create a tree of connected lanes.
DW_API_PUBLIC dwStatus dwMaps_initialize(dwMapHandle_t *mapHandle, const char *filename, dwContextHandle_t contextHandle)
Creates a map handle and initializes the map data by deserializing a driveworks maps file...
const dwMapsGeoPoint * points
pointer to polyline point array
DW_API_PUBLIC dwStatus dwMapsLaneTree_create(const dwMapsLane *lane, float32_t limit, dwMapsLaneTreeLimit limitType, dwBool doLaneChanges, dwMapsLaneTreeHandle_t laneTree)
Create a lane tree starting at a given lane.
dwMapsLaneDivider * buffer
pointer to lane divider buffer
dwMapsLane * buffer
pointer to lane buffer
dwMapsLaneTreeNode * children
children node array
NVIDIA DriveWorks API: Core Status Methods
Road segment representing a piece of the road.
DW_API_PUBLIC dwStatus dwMaps_stitchLaneGeometry(dwMapsGeoPointBuffer *polyline, const dwMapsLane *lanes, uint32_t laneCount, dwMapsLaneGeometry geometrySelection)
Stitches the poylines of a list of lanes into a single polyline.
const dwMapsRoadSegmentConnection * previous
pointer to road segment connections at segment start
dwMapsDirection
Direction compared to geometry (polyline order)
DW_API_PUBLIC dwStatus dwMaps_computeBearing(float64_t *bearingRadian, const dwMapsGeoPoint *position, const dwMapsGeoPoint *headingPoint)
Compute bearing in radian from two points.
dwMapsLaneTreeNode * parent
parent node