DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Maps.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2017-2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
31 #ifndef DW_MAPS_MAPS_H_
32 #define DW_MAPS_MAPS_H_
33 
54 #include <dw/core/Config.h>
55 #include <dw/core/Exports.h>
56 #include <dw/core/Status.h>
57 #include <dw/core/Types.h>
58 #include <dw/core/Context.h>
59 #include <dw/worldmodel/Location.h>
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 //#######################################################################################
67 // Handles
68 //#######################################################################################
69 typedef struct dwMapObject* dwMapHandle_t;
70 typedef struct dwMapObject const* dwConstMapHandle_t;
71 
72 typedef struct dwMapsLocalLayoutObject* dwMapsLocalLayoutHandle_t;
73 typedef struct dwMapsLocalLayoutObject const* dwConstMapsLocalLayoutHandle_t;
74 
75 //#######################################################################################
76 // Forward declarations
77 //#######################################################################################
80 typedef struct dwMapsLaneGroup dwMapsLaneGroup;
81 typedef struct dwMapsLane dwMapsLane;
82 typedef struct dwMapsLaneMeta dwMapsLaneMeta;
86 
95 //#######################################################################################
96 // Enums
97 //#######################################################################################
101 typedef enum dwMapsMaterial {
112 
116 typedef enum dwMapsColor {
129 } dwMapsColor;
130 
134 typedef enum dwMapsLaneDividerType {
159 
162 
166 typedef enum dwMapsLaneType {
190 
196 typedef enum dwMapsDirection {
202 
206 typedef enum dwMapsRoadSegmentType {
208 
218 
224 typedef enum dwMapsFeatureType {
232 
240 typedef enum dwMapsRoadMarkingType {
254 
258 typedef enum dwMapsSide {
262 } dwMapsSide;
263 
269 typedef enum dwMapsLaneGeometry {
274 
278 typedef enum dwMapsHDCompliance {
282 
302 
303 /*
304  * Bitmask to specify the traversability of two adjacent lanes in a lane group.
305  * This value must be respected when evaluating lane changes for a lane plan.
306  */
312 
322 
323 //#######################################################################################
324 // Global ID structs
325 //#######################################################################################
330 {
331  uint64_t id[4];
333 
337 typedef struct dwMapsLaneId
338 {
339  uint64_t id[4];
340 } dwMapsLaneId;
341 
345 typedef struct dwMapsRoadSegmentId
346 {
347  uint64_t id[3];
349 
353 typedef struct dwMapsElementId
354 {
355  uint64_t id[2];
357 
358 //#######################################################################################
359 // Connection structs
360 //#######################################################################################
361 
362 #define DW_MAPS_MAX_LANE_CONNECTIONS 100
363 
372 typedef struct dwMapsLaneConnection
373 {
375  const dwMapsLane* lane;
376  bool sameDirection;
379 
387 {
390  bool sameDirection;
392  dwTransformation3f connectedToLocal;
397 
398 //#######################################################################################
399 // Data structs
400 //#######################################################################################
401 
406 
410 typedef struct dwMapsLine
411 {
412  dwVector3f p[2];
413 } dwMapsLine;
414 
418 typedef struct dwMapsGeoPolyline
419 {
420  const dwMapsGeoPoint* points;
421  uint32_t pointCount;
423 
428 {
432 
433  DW_DEPRECATED("replaced by `geometry`")
434  dwMapsGeoPolyline absGeometry;
435  dwPolyline3f geometry;
436 
438  const dwMapsLaneDividerGroup* group;
439 };
440 
444 typedef struct dwMapsLaneDividerLine
445 {
446  dwVector3f p[2];
449 
458 {
460 
462  uint32_t laneDividerCount;
463 
465 };
466 
467 typedef uint64_t dwMapsFeatureId;
468 #define DW_MAPS_INVALID_FEATURE_ID (ULONG_MAX)
469 
474 {
475  uint32_t laneCount;
476  const dwMapsLane* const* lanes;
477  const dwMapsLaneTraversabilityMask* traversability;
481 
487 };
488 
493 {
497  float32_t speedLimit;
501 };
502 
514 {
516 
519  float32_t speedLimit;
524 
525  DW_DEPRECATED("replaced by `geometry`")
526  dwMapsGeoPolyline absGeometry;
527  dwPolyline3f geometry;
528 
529  const dwMapsLaneGroup* laneGroup;
530 
531  const dwMapsLaneDividerGroup* laneDividerGroups[2];
532 
540  const dwMapsLaneConnection* next;
541  uint32_t nextCount;
542 
543  const dwMapsLaneConnection* previous;
544  uint32_t previousCount;
545 
546  const dwMapsRoadSegment* roadSegment;
547 
549  const dwMapsLaneWaitElement* waitElements;
550  uint32_t waitElementCount;
551 
553  const dwMapsLaneWaitGroup* waitGroups;
554  uint32_t waitGroupCount;
555 };
556 
563 typedef struct dwMapsFeature
564 {
565  uint64_t id;
566  uint32_t type;
567 
568  DW_DEPRECATED("replaced by `geometry`")
569  dwMapsGeoPolyline absGeometry;
570  dwPolyline3f geometry;
571 
572  const dwMapsRoadSegment* roadSegment;
573 } dwMapsFeature;
574 
601 {
603 
604  uint32_t type;
605 
606  dwMapsGeoPoint origin;
607 
610 
612  const dwMapsLane* lanes;
613  uint32_t laneCount;
614 
616  uint32_t laneGroupCount;
617 
620 
621  const dwMapsFeature* features;
622  uint32_t featureCount;
623 
625  uint32_t nextCount;
626 
628  uint32_t previousCount;
629 };
630 
633 //#######################################################################################
634 // User buffer structs
635 //#######################################################################################
636 
650 typedef struct dwMapsGeoPointBuffer
651 {
652  dwMapsGeoPoint* buffer;
653  uint32_t maxSize;
654  uint32_t size;
656 
660 typedef struct dwMapsPointBuffer
661 {
663  uint32_t maxSize;
664  uint32_t size;
666 
671 {
673  uint32_t maxSize;
674  uint32_t size;
676 
680 typedef struct dwMapsLaneBuffer
681 {
683  uint32_t maxSize;
684  uint32_t size;
686 
690 typedef struct dwMapsLanePtrBuffer
691 {
692  const dwMapsLane** buffer;
693  uint32_t maxSize;
694  uint32_t size;
696 
701 {
703  uint32_t maxSize;
704  uint32_t size;
706 
711 {
713  uint32_t maxSize;
714  uint32_t size;
716 
720 typedef struct dwMapsFeatureBuffer
721 {
722  dwMapsFeature* buffer;
723  uint32_t maxSize;
724  uint32_t size;
726 
731 {
733  uint32_t maxSize;
734  uint32_t size;
736 
741 {
743  uint32_t maxSize;
744  uint32_t size;
746 
750 typedef struct dwMapsBoolBuffer
751 {
752  bool* buffer;
753  uint32_t maxSize;
754  uint32_t size;
756 
759 //#######################################################################################
760 // Function parameter structs
761 //#######################################################################################
762 
775 
779 typedef struct dwMapsLocalBounds
780 {
788 
791 //#######################################################################################
792 // Initialization functions
793 //#######################################################################################
794 
819 dwStatus dwMaps_initialize(dwMapHandle_t* mapHandle,
820  const char* filename,
821  dwContextHandle_t contextHandle);
822 
834 dwStatus dwMaps_release(dwMapHandle_t mapHandle);
835 
838 //#######################################################################################
839 // Serialization functions
840 //#######################################################################################
841 
857 
859 #define DW_MAPS_SERIALIZATION_FORMAT_XML_VERSION 5
860 
874 dwStatus dwMaps_serialize(const char* filename, dwMapsSerializationFormat format,
875  dwConstMapHandle_t mapHandle);
876 
879 //#######################################################################################
880 // Utility functions
881 //#######################################################################################
882 
906 dwStatus dwMaps_computeBounds(dwMapsBounds* bounds,
907  const dwMapsGeoPoint* p,
908  float32_t radiusMeter);
909 
924  const dwMapsGeoPoint* position,
925  const dwMapsGeoPoint* headingPoint);
926 
947  const dwMatrix3d* localToENURotation33);
948 
966  float32_t bearingRadian);
967 
984  const dwMapsGeoPoint* position,
985  const dwMapsGeoPoint* headingPoint);
1002  const dwVector3f* position,
1003  const dwVector3f* headingPoint);
1004 
1017 dwStatus dwMaps_getPointAhead(dwMapsGeoPoint* pointAhead,
1018  const dwMapsGeoPoint* position,
1019  const dwMatrix3d* localToENURotation33,
1020  float32_t distance);
1021 
1045  const dwMapsGeoPolyline* polylines,
1046  uint32_t polylineCount,
1047  const dwMapsGeoPoint* localOrigin,
1048  const dwMatrix3d* localToENURotation33);
1049 
1072  const dwPolyline3f* polylines,
1073  uint32_t polylineCount,
1074  const dwMapsGeoPoint* localOrigin,
1075  const dwMatrix3d* localToENURotation33);
1076 
1097 dwStatus dwMaps_transformPoint(dwVector3f* transformedPoint,
1098  const dwMapsGeoPoint* point,
1099  const dwMapsGeoPoint* localOrigin,
1100  const dwMatrix3d* localToENURotation33);
1101 
1124 dwStatus dwMaps_transformPointReverse(dwMapsGeoPoint* transformedPoint,
1125  const dwVector3f* point,
1126  const dwMapsGeoPoint* localOrigin,
1127  const dwMatrix3d* localToENURotation33);
1128 
1147  const dwMapsGeoPoint* originSource,
1148  const dwMatrix3d* localToENURotationSource,
1149  const dwMapsGeoPoint* originTarget,
1150  const dwMatrix3d* localToENURotationTarget);
1187 dwStatus dwMaps_interpolatePolylines(uint32_t* srcStartIndex,
1188  uint32_t* targetEndIndex,
1189  dwMapsGeoPointBuffer* interpolatedPoints,
1190  const dwMapsGeoPoint* srcPoints,
1191  uint32_t srcPointCount,
1192  const dwMapsGeoPoint* targetPoints,
1193  uint32_t targetPointCount,
1194  float32_t start,
1195  float32_t end,
1196  float32_t stepSize,
1197  float32_t (*interpolationFn)(float32_t, void*),
1198  void* interpolationFnContext);
1199 
1219 dwStatus dwMaps_getNeighborLaneCount(uint32_t* laneCount,
1220  uint32_t* laneCountAccessible,
1221  const dwMapsLane* lane, dwMapsSide side,
1222  bool sideRelativeToDrivingDirection);
1223 
1243 dwStatus dwMaps_getNeighborLane(const dwMapsLane** otherLane,
1244  const dwMapsLane* currentLane,
1245  dwMapsSide side, uint32_t offset,
1246  bool sideRelativeToDrivingDirection);
1247 
1279 dwStatus dwMaps_getLaneChangeAtGlobalPose(dwMapsSide* laneChangeSide,
1280  uint32_t* laneChangeCount,
1281  float32_t* laneChangeLength,
1282  const dwMapsLane* srcLane,
1283  const dwMapsLane* targetLane,
1284  const dwMapsGeoPoint* position,
1285  const dwMatrix3d* localToENURotation33);
1286 
1322 dwStatus dwMaps_getLaneChangeAtLocalPose(dwMapsSide* laneChangeSide,
1323  uint32_t* laneChangeCount,
1324  float32_t* laneChangeLength,
1325  const dwMapsLane* srcLane,
1326  const dwMapsLane* targetLane,
1327  const dwMapsRoadSegment* referenceRoadSegment,
1328  const dwVector3f* position,
1329  const dwMatrix3d* localToENURotation33);
1330 
1349 dwStatus dwMaps_getLaneChange(dwMapsSide* laneChangeSide,
1350  uint32_t* laneChangeCount,
1351  float32_t* laneChangeLength,
1352  const dwMapsLane* srcLane,
1353  const dwMapsLane* targetLane);
1354 
1370 dwStatus dwMaps_isConnectionDrivable(bool* isDrivable,
1371  const dwMapsLane* lane,
1372  const dwMapsLaneConnection* connection);
1373 
1403  dwMapsPointBuffer* pointBuffer,
1404  const dwMapsFeatureBuffer* features,
1405  const dwMapsGeoPoint* localOrigin,
1406  const dwMatrix3d* localToENURotation33,
1407  const dwMapsLocalBounds* localBounds);
1408 
1425  dwMapsLanePtrBuffer* perPointLanes,
1426  const dwMapsLane* lanes, uint32_t laneCount,
1427  dwMapsLaneGeometry geometrySelection);
1428 
1441  const dwMapsGeoPoint* points, uint32_t pointCount);
1442 
1454 dwStatus dwMaps_computeDistance(float64_t* distance, const dwMapsGeoPoint* p1, const dwMapsGeoPoint* p2);
1455 
1472 dwStatus dwMaps_closestPointOnPolyline(dwMapsGeoPoint* closestPoint,
1473  float64_t* distanceMeters,
1474  uint32_t* lineSegmentIndex,
1475  const dwMapsGeoPoint* p,
1476  const dwMapsGeoPolyline* polyline,
1477  bool ignoreHeight);
1478 
1492  const dwMapsGeoPolyline* polyline,
1493  float32_t stepSize);
1494 
1510 dwStatus dwMaps_computeBoundsSize(float32_t* width, float32_t* height, const dwMapsBounds* bounds);
1511 
1529  const dwMapsLane* localLane,
1530  const dwMapsLane* connectedLane);
1531 
1532 //#######################################################################################
1533 // Find lane splits and merges
1534 //#######################################################################################
1535 
1539 #define DW_MAPS_INVALID_LANE_INDEX 99999999
1540 
1544 typedef enum dwMapsLaneEventType {
1550 
1555 {
1558  uint32_t splitCount;
1561  uint32_t splitIndex;
1563  float32_t laneChangeLengthAfterSplit;
1574 
1578 typedef struct dwMapsLaneSplit
1579 {
1581  uint32_t splitCount;
1582  uint32_t splitIndex;
1584  float32_t laneChangeLengthAfterSplit;
1589 } dwMapsLaneSplit;
1595 
1600 {
1603  uint32_t mergingLaneCount;
1607  uint32_t mergingLaneIndex;
1614 
1618 typedef struct dwMapsLaneMerge
1619 {
1621  uint32_t mergingLaneCount;
1622  uint32_t mergingLaneIndex;
1623 } dwMapsLaneMerge;
1629 
1662 dwStatus dwMaps_getNextLaneEvent(dwMapsLaneEventType* type,
1663  dwMapsLaneSplitDetails* laneSplit,
1664  dwMapsLaneMergeDetails* laneMerge,
1665  float32_t* nextEventDist,
1666  const dwMapsLane* currentLane,
1667  const bool* forwardOnPolyline,
1668  float32_t maxDistance);
1669 
1695  float32_t* laneSplitDistance,
1696  const dwMapsLane* currentLane,
1697  float32_t maxSearchDistance,
1698  const dwMapsRoadSegment* referenceRoadSegment,
1699  const dwVector3f* position,
1700  const dwMatrix3d* localToENURotation33);
1701 
1726  float32_t* laneSplitDistance,
1727  const dwMapsLane* currentLane,
1728  float32_t maxSearchDistance,
1729  const dwMapsGeoPoint* position,
1730  const dwMatrix3d* localToENURotation33);
1731 
1734 //#######################################################################################
1735 // Query functions
1736 //#######################################################################################
1737 
1760 dwStatus dwMaps_getLane(const dwMapsLane** lane, const dwMapsLaneId* id,
1761  dwConstMapHandle_t mapHandle);
1762 
1784  uint32_t typeFilter,
1785  const dwMapsBounds* bounds,
1786  dwConstMapHandle_t mapHandle);
1787 
1804  const dwMapsLaneDividerGroupId* id,
1805  dwConstMapHandle_t mapHandle);
1806 
1828  uint32_t typeFilter,
1829  const dwMapsBounds* bounds,
1830  dwConstMapHandle_t mapHandle);
1831 
1846 dwStatus dwMaps_getFeature(const dwMapsFeature** mapsFeature,
1847  const dwMapsFeatureId* id,
1848  dwConstMapHandle_t mapHandle);
1849 
1869  const dwMapsBounds* bounds,
1870  dwConstMapHandle_t mapHandle);
1871 
1891  const dwMapsBounds* bounds,
1892  dwConstMapHandle_t mapHandle);
1893 
1909  const dwMapsRoadSegmentId* id,
1910  dwConstMapHandle_t mapHandle);
1911 
1932  dwMapsGeoPoint* closestPoint,
1933  const dwMapsGeoPoint* p,
1934  bool onlyDrivable,
1935  bool ignoreHeight,
1936  float32_t maxRadius,
1937  dwConstMapHandle_t mapHandle);
1938 
1958  dwVector3f* closestPoint,
1959  const dwMapsRoadSegment* referenceRoadSegment,
1960  const dwVector3f* position,
1961  bool onlyDrivable,
1962  float32_t maxRadius,
1963  dwConstMapHandle_t mapHandle);
1964 
1983  dwVector3f* closestPoint,
1984  const dwMapsRoadSegment* referenceRoadSegment,
1985  const dwVector3f* position,
1986  bool onlyDrivable);
1987 
2000 dwStatus dwMaps_getBounds(dwMapsBounds* bounds, dwConstMapHandle_t mapHandle);
2001 
2004 //#######################################################################################
2005 // Map Tracker
2006 //#######################################################################################
2007 
2022 typedef struct dwMapTrackerObject* dwMapTrackerHandle_t;
2023 typedef struct dwMapTrackerObject const* dwConstMapTrackerHandle_t;
2024 
2036 dwStatus dwMapTracker_initialize(dwMapTrackerHandle_t* mapTrackerHandle, dwConstMapHandle_t map);
2037 
2047 dwStatus dwMapTracker_release(dwMapTrackerHandle_t mapTrackerHandle);
2048 
2086 dwStatus dwMapTracker_updateWithGlobalPose(const dwMapsGeoPoint* position,
2087  const dwMatrix3d* localToENURotation33,
2088  dwTime_t timestamp,
2089  bool ignoreHeight,
2090  bool reset,
2091  dwMapTrackerHandle_t mapTrackerHandle);
2092 
2120 dwStatus dwMapTracker_updateWithLocalPose(const dwMapsRoadSegment* referenceRoadSegment,
2121  const dwVector3f* position,
2122  const dwMatrix3d* localToENURotation33,
2123  dwTime_t timestamp,
2124  bool reset,
2125  dwMapTrackerHandle_t mapTrackerHandle);
2126 
2138 dwStatus dwMapTracker_getCurrentLane(const dwMapsLane** currentLane,
2139  dwConstMapTrackerHandle_t mapTrackerHandle);
2140 
2153  dwConstMapTrackerHandle_t mapTrackerHandle);
2154 
2157 //#######################################################################################
2158 // Lane Tree
2159 //#######################################################################################
2160 
2172 typedef struct dwMapsLaneTreeObject* dwMapsLaneTreeHandle_t;
2173 typedef struct dwMapsLaneTreeObject const* dwConstMapsLaneTreeHandle_t;
2174 
2179 typedef enum dwMapsLaneTreeLimit {
2183 
2189 typedef struct dwMapsLaneTreeNode dwMapsLaneTreeNode;
2191 {
2192  const dwMapsLane* lane;
2193 
2196  uint32_t childrenCount;
2197 };
2198 
2203 {
2205  uint32_t maxSize;
2206  uint32_t size;
2208 
2220 dwStatus dwMapsLaneTree_initialize(dwMapsLaneTreeHandle_t* laneTreeHandle,
2221  uint32_t maxLaneCount,
2222  dwConstMapHandle_t map);
2223 
2233 dwStatus dwMapsLaneTree_release(dwMapsLaneTreeHandle_t laneTreeHandle);
2234 
2265  float32_t limit, dwMapsLaneTreeLimit limitType,
2266  bool doLaneChanges, bool forward, bool relativeToDrivingDirection,
2267  dwMapsLaneTreeHandle_t laneTree);
2268 
2286  dwConstMapsLaneTreeHandle_t laneTree);
2287 
2299 dwStatus dwMapsLaneTree_getLeafCount(uint32_t* leafCount, dwConstMapsLaneTreeHandle_t laneTree);
2300 
2316 dwStatus dwMapsLaneTree_getLaneListToLeaf(dwMapsLaneBuffer* laneBuffer, uint32_t leafIndex,
2317  dwConstMapsLaneTreeHandle_t laneTree);
2318 
2330 dwStatus dwMapsLaneTree_getLaneCount(uint32_t* laneCount, dwConstMapsLaneTreeHandle_t laneTree);
2331 
2346 dwStatus dwMapsLaneTree_getLanes(dwMapsLaneBuffer* laneBuffer, dwConstMapsLaneTreeHandle_t laneTree);
2347 
2350 //#######################################################################################
2351 // Local Map Layout
2352 //#######################################################################################
2353 
2371 {
2372  uint32_t componentId;
2373  const dwMapsRoadSegment* componentRoot; // segment closest to layoutOrigin in this component
2374  dwTransformation3f segmentToRoot; // segment ENU to root segment's ENU
2375  uint32_t hopsFromRoot; // number of graph hops from the root segment
2377 
2389 dwStatus dwMapsLocalLayout_initialize(dwMapsLocalLayoutHandle_t* localLayoutHandle, uint32_t maxRoadSegments, uint32_t maxComponents);
2390 
2400 dwStatus dwMapsLocalLayout_release(dwMapsLocalLayoutHandle_t localLayoutHandle);
2401 
2410 dwStatus dwMapsLocalLayout_reset(dwMapsLocalLayoutHandle_t localLayoutHandle);
2411 
2425  uint32_t count,
2426  dwMapsLocalLayoutHandle_t localLayoutHandle);
2427 
2440 dwStatus dwMapsLocalLayout_addRoadSegments(const dwMapsRoadSegment* segments, uint32_t count,
2441  dwMapsLocalLayoutHandle_t localLayoutHandle);
2442 
2459 dwStatus dwMapsLocalLayout_build(const dwMapsGeoPoint* layoutOrigin, dwMapsLocalLayoutHandle_t localLayoutHandle);
2460 
2471 dwStatus dwMapsLocalLayout_getComponentCount(uint32_t* componentCount, dwConstMapsLocalLayoutHandle_t localLayoutHandle);
2472 
2485 dwStatus dwMapsLocalLayout_getComponentRoot(const dwMapsRoadSegment** segment, uint32_t componentId,
2486  dwConstMapsLocalLayoutHandle_t localLayoutHandle);
2487 
2502  dwConstMapsLocalLayoutHandle_t localLayoutHandle);
2503 
2543  const dwMapsLaneDividerBuffer* laneDividers,
2544  const dwMapsGeoPoint* localOrigin,
2545  const dwMatrix3d* localToENURotation33,
2546  const dwMapsLocalBounds* localBounds,
2547  const dwVector3f* directionFilterVector,
2548  float32_t directionFilterAngleRadian,
2549  bool ignoreLaneDirection,
2550  dwConstMapsLocalLayoutHandle_t localLayoutHandle,
2551  uint32_t componentId);
2552 
2583  dwMapsPointBuffer* localPoints,
2584  const dwMapsFeatureBuffer* features,
2585  const dwMapsGeoPoint* localOrigin,
2586  const dwMatrix3d* localToENURotation33,
2587  const dwMapsLocalBounds* localBounds,
2588  dwConstMapsLocalLayoutHandle_t localLayoutHandle,
2589  uint32_t componentId);
2590 
2622  const dwMapsLaneDividerBuffer* laneDividers,
2623  const dwMatrix3f rotationLayoutRootToLocal,
2624  const dwVector3f translationLayoutRootToLocal,
2625  const dwMapsLocalBounds* localBounds,
2626  const dwVector3f* directionFilterVector,
2627  float32_t directionFilterAngleRadian,
2628  bool ignoreLaneDirection,
2629  dwConstMapsLocalLayoutHandle_t localLayoutHandle,
2630  uint32_t componentId);
2631 
2655  dwMapsPointBuffer* featurePoints,
2656  const dwMapsFeatureBuffer* dwFeatures,
2657  const dwMatrix3f rotationLayoutRootToLocal,
2658  const dwVector3f translationLayoutRootToLocal,
2659  const dwMapsLocalBounds* localBounds,
2660  dwConstMapsLocalLayoutHandle_t localLayoutHandle,
2661  uint32_t componentId);
2662 
2665 #ifdef __cplusplus
2666 }
2667 #endif
2668 
2673 #endif // DW_MAPS_MAPS_H_
DW_API_PUBLIC dwStatus dwMaps_getNeighborLaneCount(uint32_t *laneCount, uint32_t *laneCountAccessible, const dwMapsLane *lane, dwMapsSide side, bool sideRelativeToDrivingDirection)
Get the number of lanes on the current road segment next to a given lane.
dwMapsRoadSegmentId segmentId
id of the connected road segment.
Definition: Maps.h:388
area type feature
Definition: Maps.h:243
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.
dwMapsLaneMeta laneBeforeSplit
lane that splits
Definition: Maps.h:1580
Road feature defined by a polyline, with attributes.
Definition: Maps.h:563
struct dwMapsLaneWaitElement dwMapsLaneWaitElement
Definition: Maps.h:84
DW_API_PUBLIC dwStatus dwMaps_computeBearingFromRotation(float64_t *bearingRadian, const dwMatrix3d *localToENURotation33)
Compute bearing in radian from localToENU rotation.
DW_API_PUBLIC dwStatus dwMaps_transformLaneDividersToLocalLinesViaRelative(dwMapsLaneDividerLineBuffer *lineSegments, const dwMapsLaneDividerBuffer *laneDividers, const dwMatrix3f rotationLayoutRootToLocal, const dwVector3f translationLayoutRootToLocal, const dwMapsLocalBounds *localBounds, const dwVector3f *directionFilterVector, float32_t directionFilterAngleRadian, bool ignoreLaneDirection, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId)
Get line segments from the list of specified dividers, transformed into the camera coordinate system...
uint32_t maxSize
maximum number of lane dividers that fit into the buffer
Definition: Maps.h:713
struct dwMapTrackerObject * dwMapTrackerHandle_t
Definition: Maps.h:2022
const dwMapsLaneDividerGroup * laneDividerGroups
pointer to lane divider group array of this segment
Definition: Maps.h:618
DW_API_PUBLIC dwStatus dwMaps_getRoadSegments(dwMapsRoadSegmentBuffer *roadSegments, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get road segments within bounds.
User provided buffer of boolean variables.
Definition: Maps.h:750
User provided buffer of dwPolyline3f.
Definition: Maps.h:670
NVIDIA DriveWorks API: Core Types
uint32_t previousCount
number of segment connections at segment start
Definition: Maps.h:628
DW_API_PUBLIC dwStatus dwMaps_getNeighborLane(const dwMapsLane **otherLane, const dwMapsLane *currentLane, dwMapsSide side, uint32_t offset, bool sideRelativeToDrivingDirection)
Get a neighbor lane on a given side.
float float32_t
Specifies POD types.
Definition: Types.h:70
const dwMapsRoadSegment * roadSegment
parent road segment
Definition: Maps.h:464
dwMapsLaneMeta laneAfterMerge
lane into which the lanes merge
Definition: Maps.h:1620
Defines a single-precision 3D polyline.
Definition: Types.h:404
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.
Definition: Maps.h:418
DW_API_PUBLIC dwStatus dwMapsLaneTree_release(dwMapsLaneTreeHandle_t laneTreeHandle)
Release lane tree handle.
DW_API_PUBLIC dwStatus dwMaps_getFeature(const dwMapsFeature **mapsFeature, const dwMapsFeatureId *id, dwConstMapHandle_t mapHandle)
Get a map feature queried by a feature id.
uint32_t size
current number of valid lanes in the buffer
Definition: Maps.h:694
Lane defined by a polyline, with lane attributes.
Definition: Maps.h:513
DW_API_PUBLIC dwStatus dwMapsLocalLayout_build(const dwMapsGeoPoint *layoutOrigin, dwMapsLocalLayoutHandle_t localLayoutHandle)
Computes relative transforms between segments previously added to the layout:
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
Definition: Maps.h:619
dwGeoBounds dwMapsBounds
Map coordinate bounds.
Definition: Maps.h:774
DW_API_PUBLIC dwStatus dwMapTracker_release(dwMapTrackerHandle_t mapTrackerHandle)
Release map tracker handle.
uint32_t size
current number of valid road segments in the buffer
Definition: Maps.h:734
Group of lane dividers, representing one boundary of a lane.
Definition: Maps.h:457
dwMapsGeoPoint * buffer
pointer to geo point buffer
Definition: Maps.h:652
float32_t minY
Definition: Maps.h:782
dwMapsFeature * buffer
pointer to feature buffer
Definition: Maps.h:722
uint32_t laneCount
number of lanes in this segment
Definition: Maps.h:613
DW_API_PUBLIC dwStatus dwMapsLocalLayout_release(dwMapsLocalLayoutHandle_t localLayoutHandle)
Destroys a local layout object.
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLeafCount(uint32_t *leafCount, dwConstMapsLaneTreeHandle_t laneTree)
dwMapsLaneTree_getLeafCount
uint32_t mergingLaneIndex
index of the connection that connects to the lane on the lane plan.
Definition: Maps.h:1607
Defines a three-element floating-point vector.
Definition: Types.h:319
uint32_t mergingLaneIndex
index of the connection that connects to the lane on the lane plan.
Definition: Maps.h:1622
const dwMapsLane * lanes
pointer to lane array of this segment
Definition: Maps.h:612
DW_API_PUBLIC dwStatus dwMaps_transformRoadFeaturesToLocalLines(dwMapsPolyline3fBuffer *localPolylines, dwMapsPointBuffer *localPoints, const dwMapsFeatureBuffer *features, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33, const dwMapsLocalBounds *localBounds, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId)
Get polylines and points from the list of specified features, transformed into a local cartesian coor...
DW_API_PUBLIC dwStatus dwMaps_transformLaneDividersToLocalLines(dwMapsLaneDividerLineBuffer *lineSegments, const dwMapsLaneDividerBuffer *laneDividers, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33, const dwMapsLocalBounds *localBounds, const dwVector3f *directionFilterVector, float32_t directionFilterAngleRadian, bool ignoreLaneDirection, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId)
Get line segments from the list of specified dividers, transformed into a local cartesian coordinate ...
Basic lane informatin.
Definition: Maps.h:492
uint32_t maxSize
maximum number of nodes that fit into the buffer
Definition: Maps.h:2205
const dwMapsRoadSegmentConnection * next
pointer to road segment connections at segment end
Definition: Maps.h:624
uint32_t size
current number of valid booleans in the buffer
Definition: Maps.h:754
User provided buffer of dwMapsLines.
Definition: Maps.h:700
uint32_t maxSize
maximum number of lanes that fit into the buffer
Definition: Maps.h:683
Lane Tree Node.
Definition: Maps.h:2190
Geographic coordinate bounds.
Definition: Location.h:58
DW_API_PUBLIC dwStatus dwMapsLocalLayout_getComponentRoot(const dwMapsRoadSegment **segment, uint32_t componentId, dwConstMapsLocalLayoutHandle_t localLayoutHandle)
Returns the root segment of the specified connected component.
uint32_t size
current number of valid features in the buffer
Definition: Maps.h:724
dwMapsLaneType type
lane type
Definition: Maps.h:517
DW_API_PUBLIC dwStatus dwMaps_computeLocalToLocalTransform(dwTransformation3f *transform, const dwMapsGeoPoint *originSource, const dwMatrix3d *localToENURotationSource, const dwMapsGeoPoint *originTarget, const dwMatrix3d *localToENURotationTarget)
Compute transform (translation and rotation) that changes a 3d point from one coordinate system to an...
dwMapsColor color
lane divider color
Definition: Maps.h:431
dwMapsLaneTreeLimit
Enum to select the lane tree limit type.
Definition: Maps.h:2179
dwMapsLaneDividerGroupId id
globally unique id of the group
Definition: Maps.h:459
dwMapsDirection drivingDirection
driving direction compared to geometry polyline direction (which is also the road segment orientation...
Definition: Maps.h:518
uint32_t laneCount
The number of lanes in this group.
Definition: Maps.h:475
DW_API_PUBLIC dwStatus dwMaps_computeDistance(float64_t *distance, const dwMapsGeoPoint *p1, const dwMapsGeoPoint *p2)
Compute Euclidean distance between two points.
Globally unique identifier for lanes.
Definition: Maps.h:337
DW_API_PUBLIC dwStatus dwMaps_transformRoadFeaturesToLocalSpace(dwMapsPolyline3fBuffer *localPolylines, dwMapsPointBuffer *pointBuffer, const dwMapsFeatureBuffer *features, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33, const dwMapsLocalBounds *localBounds)
Get geometry from the list of specified road features, transformed into a local cartesian coordinate ...
crosswalk type feature
Definition: Maps.h:246
uint32_t type
type of a feature
Definition: Maps.h:566
dwMapsGeoPoint origin
origin of segment&#39;s ENU coordinate frame.
Definition: Maps.h:606
dwMapsHDCompliance hdCompliance
hd compliance of contents
Definition: Maps.h:609
User provided buffer of dwVector3f.
Definition: Maps.h:660
const dwMapsRoadSegment ** buffer
pointer to road segment pointer buffer
Definition: Maps.h:742
Defines a graph connection to an adjacent road segment.
Definition: Maps.h:386
NVIDIA DriveWorks API: Core Methods
struct dwMapObject * dwMapHandle_t
Definition: Maps.h:69
User provided buffer of dwMapsGeoPoint.
Definition: Maps.h:650
uint32_t mergingLaneCount
number of merging lanes
Definition: Maps.h:1621
DW_API_PUBLIC dwStatus dwMaps_getFeatures(dwMapsFeatureBuffer *features, uint32_t typeFilter, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get features within bounds.
Lane merge on a lane plan.
Definition: Maps.h:1618
uint32_t featureCount
number of features in this segment
Definition: Maps.h:622
dwMapsMaterial material
lane divider material
Definition: Maps.h:430
uint32_t maxSize
maximum number of points that fit into the buffer
Definition: Maps.h:663
DW_API_PUBLIC dwStatus dwMapTracker_updateWithLocalPose(const dwMapsRoadSegment *referenceRoadSegment, const dwVector3f *position, const dwMatrix3d *localToENURotation33, dwTime_t timestamp, bool reset, dwMapTrackerHandle_t mapTrackerHandle)
dwMapTracker_updateWithLocalPose
const dwMapsLaneDivider * laneDividers
pointer to lane divider array
Definition: Maps.h:461
bool * buffer
pointer to bool buffer
Definition: Maps.h:752
double float64_t
Definition: Types.h:71
dwMapsRoadSegmentType
Road segment types.
Definition: Maps.h:206
Represents a geometric connection to another lane in the map.
Definition: Maps.h:372
arrow feature, eg, left turn arrow, etc
Definition: Maps.h:248
Specifies a 3D rigid transformation.
Definition: Types.h:462
dwMapsTrafficSignalState
Bitmask to specify the state of a traffic signal.
Definition: Maps.h:288
uint32_t size
current number of valid points in the buffer
Definition: Maps.h:664
DW_API_PUBLIC dwStatus dwMaps_getLaneDividerGroup(const dwMapsLaneDividerGroup **laneDividerGroup, const dwMapsLaneDividerGroupId *id, dwConstMapHandle_t mapHandle)
Get a lane divider group queried by a lane divider group id.
Location point defined by WGS84 coordinates.
dwMapsDirection drivingDirection
driving direction compared to geometry polyline direction (which is also the road segment orientation...
Definition: Maps.h:496
dwMapsLaneId id
globally unique id of the lane
Definition: Maps.h:515
DW_API_PUBLIC dwStatus dwMaps_getNextLaneSplitAtLocalPose(dwMapsLaneSplitDetails *laneSplit, float32_t *laneSplitDistance, const dwMapsLane *currentLane, float32_t maxSearchDistance, const dwMapsRoadSegment *referenceRoadSegment, const dwVector3f *position, const dwMatrix3d *localToENURotation33)
Get next lane split.
exit line type feature
Definition: Maps.h:250
line type feature
Definition: Maps.h:242
uint64_t id
unique id of a feature
Definition: Maps.h:565
dwMapsLaneId id
globally unique id of the lane
Definition: Maps.h:494
DW_API_PUBLIC dwStatus dwMaps_getPointAhead(dwMapsGeoPoint *pointAhead, const dwMapsGeoPoint *position, const dwMatrix3d *localToENURotation33, float32_t distance)
Get wgs84 point moving forward from a position.
DW_API_PUBLIC dwStatus dwMaps_resamplePolyline(dwMapsGeoPointBuffer *result, const dwMapsGeoPolyline *polyline, float32_t stepSize)
Resample a polyline of WGS84 points to a polyline with fixed step size.
uint32_t laneGroupCount
lane group count
Definition: Maps.h:616
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 lanes that fit into the buffer
Definition: Maps.h:693
uint32_t maxSize
maximum number of points that fit into the buffer
Definition: Maps.h:653
uint32_t size
current number of valid lanes in the buffer
Definition: Maps.h:684
uint32_t maxSize
maximum number of features that fit into the buffer
Definition: Maps.h:723
dwStatus
Status definition.
Definition: Status.h:166
DW_API_PUBLIC dwStatus dwMaps_computeBearingFromGeoPoints(float64_t *bearingRadian, const dwMapsGeoPoint *position, const dwMapsGeoPoint *headingPoint)
Compute bearing in radian from two points.
User provided buffer of dwMapsRoadSegments.
Definition: Maps.h:730
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
Definition: Maps.h:429
symbol type feature, eg, car pool symbol, etc
Definition: Maps.h:247
uint32_t splitCount
number of lanes emerging from the lane before the split
Definition: Maps.h:1581
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
Definition: Maps.h:733
dwMapsLaneEventType
Lane event type indicates whether the next lane event is a lane split, a lane merge, or both.
Definition: Maps.h:1544
const dwMapsLane *const * lanes
The lanes in this group from left to right.
Definition: Maps.h:476
dwMapsSide
Enum for sides.
Definition: Maps.h:258
dwMapsRoadSegment * buffer
pointer to road segment buffer
Definition: Maps.h:732
Lane merge on a lane plan.
Definition: Maps.h:1599
const dwMapsRoadSegment * roadSegment
parent road segment
Definition: Maps.h:486
dwPolyline3f * buffer
pointer to polyline buffer
Definition: Maps.h:672
#define DW_MAPS_MAX_LANE_CONNECTIONS
Definition: Maps.h:362
exit type feature
Definition: Maps.h:245
DW_API_PUBLIC dwStatus dwMaps_getLaneChange(dwMapsSide *laneChangeSide, uint32_t *laneChangeCount, float32_t *laneChangeLength, const dwMapsLane *srcLane, const dwMapsLane *targetLane)
Check if there&#39;s a valid lane change from one lane to another on the same road segment.
struct dwMapsLaneWaitGroup dwMapsLaneWaitGroup
Definition: Maps.h:85
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
dwMapsMaterial
Material type values.
Definition: Maps.h:101
const dwMapsLane * lane
pointer to the connected lane.
Definition: Maps.h:375
dwMapsLaneGeometry
Enum for selection of lane geometry.
Definition: Maps.h:269
User provided buffer of dwMapsFeatures.
Definition: Maps.h:720
#define DW_DEPRECATED(msg)
Definition: Exports.h:68
const dwMapsLaneGroup * laneGroups
pointer to array of lane groups in this segment
Definition: Maps.h:615
DW_API_PUBLIC dwStatus dwMapsLocalLayout_addRoadSegments(const dwMapsRoadSegment *segments, uint32_t count, dwMapsLocalLayoutHandle_t localLayoutHandle)
Add road segments to the layout.
DW_API_PUBLIC dwStatus dwMaps_transformPointReverse(dwMapsGeoPoint *transformedPoint, const dwVector3f *point, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33)
Transform a point in a local coordinate system defined by position &#39;localOrigin&#39; and rotation matrix ...
float32_t minX
Definition: Maps.h:781
DW_API_PUBLIC dwStatus dwMapsLocalLayout_getComponentCount(uint32_t *componentCount, dwConstMapsLocalLayoutHandle_t localLayoutHandle)
Returns the number of connected components discovered while building the layout.
dwMapsLaneTreeNode * buffer
pointer to node buffer
Definition: Maps.h:2204
dwMapsFeatureType
Feature types.
Definition: Maps.h:224
DW_API_PUBLIC dwStatus dwMapsLocalLayout_reset(dwMapsLocalLayoutHandle_t localLayoutHandle)
Clear out previously added road segments.
struct dwMapTrackerObject const * dwConstMapTrackerHandle_t
Definition: Maps.h:2023
Globally unique identifier for road segments.
Definition: Maps.h:345
DW_API_PUBLIC dwStatus dwMapsLocalLayout_addRoadSegmentPointers(const dwMapsRoadSegment **segmentPointers, uint32_t count, dwMapsLocalLayoutHandle_t localLayoutHandle)
Add road segment pointers to the layout.
dwVector3f * buffer
pointer to point buffer
Definition: Maps.h:662
DW_API_PUBLIC dwStatus dwMapsLocalLayout_getSegmentPose(dwMapsLocalLayoutSegmentPose *pose, const dwMapsRoadSegmentId *segmentId, dwConstMapsLocalLayoutHandle_t localLayoutHandle)
Provides information about road segment pose relative to layout component root.
Lane divider line defined by two points and the owner of a line.
Definition: Maps.h:444
dwGeoPoint dwMapsGeoPoint
Point defined by WGS84 coordinates.
Definition: Maps.h:405
uint32_t size
current number of valid nodes in the buffer
Definition: Maps.h:2206
struct dwMapsLaneTreeObject * dwMapsLaneTreeHandle_t
Definition: Maps.h:2172
Defines a 3x3 matrix of double floating point numbers.
Definition: Types.h:250
Defines a 3x3 matrix of floating point numbers.
Definition: Types.h:237
DW_API_PUBLIC dwStatus dwMaps_transformPoint(dwVector3f *transformedPoint, const dwMapsGeoPoint *point, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33)
Transform a WGS84 point into a point in a local coordinate system defined by position &#39;localOrigin&#39; a...
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.
Definition: Maps.h:710
DW_API_PUBLIC dwStatus dwMaps_getLane(const dwMapsLane **lane, const dwMapsLaneId *id, dwConstMapHandle_t mapHandle)
Get a lane queried by a lane id.
dwTransformation3f segmentToRoot
Definition: Maps.h:2374
dwMapsSerializationFormat
Serialization formats.
Definition: Maps.h:853
const dwMapsLane ** buffer
pointer to lane buffer
Definition: Maps.h:692
struct dwMapsLocalLayoutObject * dwMapsLocalLayoutHandle_t
Definition: Maps.h:72
DW_API_PUBLIC dwStatus dwMaps_transformFeaturesToLocalLinesViaRelative(dwMapsPolyline3fBuffer *featureLineSegments, dwMapsPointBuffer *featurePoints, const dwMapsFeatureBuffer *dwFeatures, const dwMatrix3f rotationLayoutRootToLocal, const dwVector3f translationLayoutRootToLocal, const dwMapsLocalBounds *localBounds, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId)
Get featureLineSegments and featurePoints from the list of specified dwFeatures, transformed into the...
DW_API_PUBLIC dwStatus dwMapTracker_getCurrentCandidateLanes(dwMapsLaneBuffer *lanes, dwConstMapTrackerHandle_t mapTrackerHandle)
Get current lane candidates that have been used to find the current lane.
float32_t maxX
Definition: Maps.h:784
uint32_t size
current number of valid points in the buffer
Definition: Maps.h:654
Provides information about road segment pose relative to layout component root.
Definition: Maps.h:2370
DW_API_PUBLIC dwStatus dwMaps_getLaneChangeAtGlobalPose(dwMapsSide *laneChangeSide, uint32_t *laneChangeCount, float32_t *laneChangeLength, const dwMapsLane *srcLane, const dwMapsLane *targetLane, const dwMapsGeoPoint *position, const dwMatrix3d *localToENURotation33)
Check if there&#39;s a valid lane change from one lane to another on the same road segment.
DW_API_PUBLIC dwStatus dwMaps_getClosestLaneFromGeoPoint(const dwMapsLane **closestLane, dwMapsGeoPoint *closestPoint, const dwMapsGeoPoint *p, bool onlyDrivable, bool ignoreHeight, float32_t maxRadius, dwConstMapHandle_t mapHandle)
Get closest lane in the map to a global gps point.
DW_API_PUBLIC dwStatus dwMaps_transformPolylinesReverse(dwMapsGeoPointBuffer *transformedPoints, const dwPolyline3f *polylines, uint32_t polylineCount, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33)
Transform local space polylines into WGS84 point polylines.
uint32_t laneDividerCount
number of lane dividers in group
Definition: Maps.h:462
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
Definition: Maps.h:421
const dwMapsLane * lane
lane
Definition: Maps.h:2192
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLanes(dwMapsLaneBuffer *laneBuffer, dwConstMapsLaneTreeHandle_t laneTree)
Get all lanes in lane tree.
dwMapsLaneDividerType
Lane divider type and filter values.
Definition: Maps.h:134
DW_API_PUBLIC dwStatus dwMapsLaneTree_create(const dwMapsLane *lane, float32_t limit, dwMapsLaneTreeLimit limitType, bool doLaneChanges, bool forward, bool relativeToDrivingDirection, dwMapsLaneTreeHandle_t laneTree)
Create a lane tree starting at a given lane.
float32_t maxZ
Definition: Maps.h:786
uint64_t dwMapsFeatureId
Definition: Maps.h:467
NVIDIA DriveWorks API: Global Egomotion Methods
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
uint32_t childrenCount
size of children node array
Definition: Maps.h:2196
dwMapsLaneType
Lane types.
Definition: Maps.h:166
const dwMapsLaneDivider * divider
owner of a line
Definition: Maps.h:447
DW_API_PUBLIC dwStatus dwMapsLocalLayout_initialize(dwMapsLocalLayoutHandle_t *localLayoutHandle, uint32_t maxRoadSegments, uint32_t maxComponents)
Creates a local map layout object, which provides locally-accurate relative poses of road segments...
User provided buffer of dwMapsLaneTreeNode.
Definition: Maps.h:2202
entry line type Feature
Definition: Maps.h:249
DW_API_PUBLIC dwStatus dwMaps_computeRotationFromLocalPoints(dwMatrix3d *localToENURotation33, const dwVector3f *position, const dwVector3f *headingPoint)
Compute orientation matrix from two local points in an ENU space.
DW_API_PUBLIC dwStatus dwMaps_computeBoundsSize(float32_t *width, float32_t *height, const dwMapsBounds *bounds)
Compute width and height of bounds in meters.
DW_API_PUBLIC dwStatus dwMaps_getClosestLaneOnRoadSegment(const dwMapsLane **closestLane, dwVector3f *closestPoint, const dwMapsRoadSegment *referenceRoadSegment, const dwVector3f *position, bool onlyDrivable)
Get closest lane on a road segment, given a position in coordinates of the same road segment...
struct dwMapObject const * dwConstMapHandle_t
Definition: Maps.h:70
unknown and default type
Definition: Maps.h:241
uint32_t nextCount
number of segment connections at segment end
Definition: Maps.h:625
dwMapsLaneDividerLine * buffer
pointer to line buffer
Definition: Maps.h:702
dwMapsRoadMarkingType
Subtypes of DW_MAPS_FEATURE_ROAD_MARKING.
Definition: Maps.h:240
uint32_t maxSize
maximum number of booleans that can fit into the buffer
Definition: Maps.h:753
DW_API_PUBLIC dwStatus dwMaps_getRoadSegment(const dwMapsRoadSegment **roadSegment, const dwMapsRoadSegmentId *id, dwConstMapHandle_t mapHandle)
Get a road segment queried by a road segment id.
dwMapsLaneTraversability
Definition: Maps.h:307
Globally unique identifier for lane divider groups.
Definition: Maps.h:329
DW_API_PUBLIC dwStatus dwMaps_release(dwMapHandle_t mapHandle)
Release map handle.
DW_API_PUBLIC dwStatus dwMaps_getRoadSegmentPointers(dwMapsRoadSegmentPointerBuffer *roadSegmentPointers, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get pointers to road segments within bounds.
Identifier for general map elements.
Definition: Maps.h:353
DW_API_PUBLIC dwStatus dwMaps_getClosestLaneFromLocalPoint(const dwMapsLane **closestLane, dwVector3f *closestPoint, const dwMapsRoadSegment *referenceRoadSegment, const dwVector3f *position, bool onlyDrivable, float32_t maxRadius, dwConstMapHandle_t mapHandle)
Get closest lane in the map to a point in a local coordinate of a road segment.
dwMapsLaneId laneId
id of the connected lane.
Definition: Maps.h:374
User provided buffer of dwMapsLane.
Definition: Maps.h:680
const dwMapsRoadSegment * segment
pointer to the connected road segment.
Definition: Maps.h:389
NVIDIA DriveWorks API: Core Exports
float32_t maxY
Definition: Maps.h:785
Local coordinate bounds.
Definition: Maps.h:779
uint32_t size
current number of valid polylines in the buffer
Definition: Maps.h:674
struct dwMapsLocalLayoutObject const * dwConstMapsLocalLayoutHandle_t
Definition: Maps.h:73
uint32_t type
road segment type. this can be a bitwise combination of dwMapsRoadSegmentType.
Definition: Maps.h:604
Lane divider defined by a polyline, with type, material and color information.
Definition: Maps.h:427
DW_API_PUBLIC dwStatus dwMaps_getNextLaneEvent(dwMapsLaneEventType *type, dwMapsLaneSplitDetails *laneSplit, dwMapsLaneMergeDetails *laneMerge, float32_t *nextEventDist, const dwMapsLane *currentLane, const bool *forwardOnPolyline, float32_t maxDistance)
Get the next lane split and/or lane merge.
DW_API_PUBLIC dwStatus dwMaps_computeRotationFromBearing(dwMatrix3d *localToENURotation33, float32_t bearingRadian)
Create a rotation matrix that transfroms from a local coordinate system with x-axis pointing towards ...
DW_API_PUBLIC dwStatus dwMaps_stitchLaneGeometry(dwMapsPointBuffer *polyline, dwMapsLanePtrBuffer *perPointLanes, const dwMapsLane *lanes, uint32_t laneCount, dwMapsLaneGeometry geometrySelection)
Stitches the polylines of a list of lanes into a single polyline.
DW_API_PUBLIC dwStatus dwMaps_getConnectedToLocal(dwTransformation3f *connectedToLocal, const dwMapsLane *localLane, const dwMapsLane *connectedLane)
Get coordinate transform to transform a point in connectedLane&#39;s coordinate system into the localLane...
DW_API_PUBLIC dwStatus dwMaps_getNextLaneSplitAtGlobalPose(dwMapsLaneSplitDetails *laneSplit, float32_t *laneSplitDistance, const dwMapsLane *currentLane, float32_t maxSearchDistance, const dwMapsGeoPoint *position, const dwMatrix3d *localToENURotation33)
Get next lane split.
uint32_t size
current number of valid road segment pointers in the buffer
Definition: Maps.h:744
Lane split on a lane plan.
Definition: Maps.h:1578
const dwMapsRoadSegment * componentRoot
Definition: Maps.h:2373
uint32_t maxSize
maximum number of lines that fit into the buffer
Definition: Maps.h:703
uint32_t size
current number of valid lines in the buffer
Definition: Maps.h:704
A group of neighboring lanes and their traversability.
Definition: Maps.h:473
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
Definition: Maps.h:673
uint32_t size
current number of valid lane dividers in the buffer
Definition: Maps.h:714
DW_API_PUBLIC dwStatus dwMaps_computeRotationFromGeoPoints(dwMatrix3d *localToENURotation33, const dwMapsGeoPoint *position, const dwMapsGeoPoint *headingPoint)
Compute orientation matrix from two WGS84 points.
Line defined by 2 points in user defined coordinates.
Definition: Maps.h:410
const dwMapsFeature * features
pointer to features of this segment
Definition: Maps.h:621
struct dwMapsLaneTreeObject const * dwConstMapsLaneTreeHandle_t
Definition: Maps.h:2173
NVIDIA DriveWorks API: Location
Lane split on a lane plan.
Definition: Maps.h:1554
dwMapsRoadSegmentId id
globally unique id of the road segment
Definition: Maps.h:602
float32_t minZ
Definition: Maps.h:783
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.
const dwMapsLane * laneBeforeSplit
lane that splits
Definition: Maps.h:1556
exit area type feature
Definition: Maps.h:252
DW_API_PUBLIC dwStatus dwMaps_getBounds(dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
Get bounds of map data currently in memory.
uint32_t dwMapsLaneTraversabilityMask
A mask composed of traversability information from enum dwMapsLaneTraversability. ...
Definition: Maps.h:321
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
Definition: Maps.h:420
#define DW_API_PUBLIC
Definition: Exports.h:56
dwMapsColor
Colors.
Definition: Maps.h:116
dwMapsLaneDivider * buffer
pointer to lane divider buffer
Definition: Maps.h:712
DW_API_PUBLIC dwStatus dwMapTracker_updateWithGlobalPose(const dwMapsGeoPoint *position, const dwMatrix3d *localToENURotation33, dwTime_t timestamp, bool ignoreHeight, bool reset, dwMapTrackerHandle_t mapTrackerHandle)
Update the tracker with the current pose defined by a WGS84 point and a rotation matrix.
entry type feature
Definition: Maps.h:244
dwMapsLane * buffer
pointer to lane buffer
Definition: Maps.h:682
DW_API_PUBLIC dwStatus dwMaps_transformPolylines(dwMapsPointBuffer *transformedPoints, const dwMapsGeoPolyline *polylines, uint32_t polylineCount, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33)
Transform polylines into points in a local coordinate system defined by position &#39;localOrigin&#39; and ro...
DW_API_PUBLIC dwStatus dwMaps_closestPointOnPolyline(dwMapsGeoPoint *closestPoint, float64_t *distanceMeters, uint32_t *lineSegmentIndex, const dwMapsGeoPoint *p, const dwMapsGeoPolyline *polyline, bool ignoreHeight)
Find closest point on a polyline of WGS84 points.
dwMapsLaneTreeNode * children
children node array
Definition: Maps.h:2195
DW_API_PUBLIC dwStatus dwMaps_getLaneChangeAtLocalPose(dwMapsSide *laneChangeSide, uint32_t *laneChangeCount, float32_t *laneChangeLength, const dwMapsLane *srcLane, const dwMapsLane *targetLane, const dwMapsRoadSegment *referenceRoadSegment, const dwVector3f *position, const dwMatrix3d *localToENURotation33)
Check if there&#39;s a valid lane change from one lane to another on the same road segment.
NVIDIA DriveWorks API: Core Status Methods
Road Segment represents an atomic element of the core layer of a Map.
Definition: Maps.h:600
User provided buffer of dwMapsRoadSegment pointers.
Definition: Maps.h:740
const dwMapsRoadSegmentConnection * previous
pointer to road segment connections at segment start
Definition: Maps.h:627
DW_API_PUBLIC dwStatus dwMaps_isConnectionDrivable(bool *isDrivable, const dwMapsLane *lane, const dwMapsLaneConnection *connection)
Check whether it is possible/allowed to drive from the given onto the given connection.
User provided buffer of dwMapsLane pointers.
Definition: Maps.h:690
uint32_t maxSize
maximum number of road segment pointers that fit into the buffer
Definition: Maps.h:743
entry area type Feature
Definition: Maps.h:251
dwMapsDirection
Direction compared to geometry (polyline order).
Definition: Maps.h:196
dwMapsHDCompliance
Enum for road segment hd compliance.
Definition: Maps.h:278
const dwMapsLane * laneAfterMerge
lane into which the lanes merge
Definition: Maps.h:1601
dwMapsLaneType type
lane type
Definition: Maps.h:495
dwMapsLaneTreeNode * parent
parent node
Definition: Maps.h:2194