1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page laneplanner_usecase6 Lane Plan Events
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
7 There are 3 kinds of events that appear while driving along a Lane Plan:
13 An any point on the lane plan the next appearance of each event can be queried:
16 dwStatus dwLanePlan_getNextLaneChange(
17 dwLanePlanIndex* laneChangePointIndex,
18 dwLanePlanLaneChange* laneChange,
19 const dwLanePlanIndex* queryPointIndex,
20 dwConstLanePlanHandle_t lanePlan);
22 dwStatus dwLanePlan_getNextLaneSplit(
23 dwLanePlanIndex* laneSplitPointIndex,
24 dwLanePlanLaneSplit* laneSplit,
25 const dwLanePlanIndex* queryPointIndex,
26 dwConstLanePlanHandle_t lanePlan);
28 dwStatus dwLanePlan_getNextLaneMerge(
29 dwLanePlanIndex* laneMergelanePlanIndex,
30 dwLanePlanLaneMerge* laneMerge,
31 const dwLanePlanIndex* queryPointIndex,
32 dwConstLanePlanHandle_t lanePlan);
37 A Lane Change is described by the lane change side in driving direction and the number of lane changes that are necessary:
40 typedef struct dwLanePlanLaneChange {
41 // Side towards the lane change is going.
42 dwMapsSide laneChangeSide;
44 // Number of lanes that need to be changed.
45 uint32_t laneChangeCount;
46 } dwLanePlanLaneChange;
49 The exact geometry about where the lane change must happen can be extracted from the Lane Plan Segment, where the lane change happens.
53 A Lane Split is a case where a lane has more than one outgoing connections. The exact point of the lane split is the point on the Lane Plan that corresponds to the returned laneSplitPointIndex.
55 The involved lanes are described in the dwLanePlanLaneSplit struct:
58 typedef struct dwLanePlanLaneSplit
61 const dwMapsLane* laneBeforeSplit;
63 // list of connections leading into const the new lanes,
64 // sorted from left to right.
65 dwMapsLaneConnection* splitLanes[DW_MAPS_MAX_LANE_CONNECTIONS];
68 // Number of lanes emerging from
69 // the lane before the split.
72 // Index of the connection that follows the lane plan.
73 // DW_PLANNING_LANEPLANNER_INVALID_LANE_INDEX
74 // if the information is not available.
76 } dwLanePlanLaneSplit;
79 The key fields in this structure are:
81 - laneBeforeSplit enters the lane split point.
82 - splitLanes lists all outgoing connections.
83 - splitIndex refers to the connection in that list that must be followed to stay on the Lane Plan.
87 A Lane Merge is a case where a lane has more than one incoming connections. The exact point where the joining lanes merge into a single lane is the point on the Lane Plan that corresponds to the returned lanePlanMergeIndex. The involved lanes in the merge are described in the `dwLanePlanLaneMerge` struct:
90 typedef struct dwLanePlanLaneMerge
92 //< lane into which the lanes merge.
93 const dwMapsLane* laneAfterMerge;
95 //< connections leading from
96 // 'laneAfterMerge' into the
98 // Sorted from left to right.
99 const dwMapsLaneConnection* mergingLanes[DW_MAPS_MAX_LANE_CONNECTIONS];
101 // number of merging lanes
102 uint32_t mergingLaneCount;
104 // Index of the connection that connects to the lane on
105 // the lane plan. DW_ROUTPLANNER_INVALID_LANE_INDEX
106 // if the information is not available.
107 uint32_t mergingLaneIndex;
108 } dwLanePlanLaneMerge;
111 ‘laneAfterMerge’ is the lane after the merge point. All incoming connections forming the merge are listed in the ‘mergingLanes’ list, with ‘mergingLaneIndex’ referring to the connection that comes from the Lane Plan.