1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page laneplanner_usecase3 Lane Plan
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
7 A Lane Plan is described by the `dwLanePlan` struct:
10 typedef struct dwLanePlan
12 // List of segments along the lane plan.
13 const dwLanePlanSegment* segments;
15 // Number segments in lane plan.
16 uint32_t segmentCount;
20 To access the dwLanePlan struct, call:
23 dwStatus dwLanePlan_get(
25 dwConstLanePlanHandle_t lanePlanHandle);
28 The dwLanePlan struct is a list of Lane Plan Segments. Each Lane Plan Segment has a list of Lane Plan Lanes that describe the current lane change situation at that segment:
31 typedef struct dwLanePlanSegment
33 // List of lanes. The first lane in the list is the lane
34 // where the lane plan segment is entered, the last one
35 // is where the lane plan segment is exited. If there is
36 // more than one lane, lane changes must be done from the
37 // first to the last lane, traversing all in-between
39 const dwLanePlanLane* lanes;
41 // Number of lanes in this segment. If there are more than
42 // one, it is a lane change segment.
46 dwMapsSide laneChangeSide;
50 A Lane Plan Lane is a polyline, together with pointers to the original dwMapsLane for each point:
53 typedef struct dwLanePlanLane
55 // Polyline point array
56 const dwMapsGeoPoint* points;
58 // Pointers to the corresponding lane (per point)
59 const dwMapsLane** pointLanes;
61 // Estimated time of arrival (per point)
62 // relative to beginning of first lane of the lane plan,
63 // computed based on lane speed limits. 50 km/h is assumed
64 // if no speed limit is defined for a lane.
65 const dwTime_t* times;
72 If the segment has only one Lane Plan Lane, then that lane must be followed. If there is more than one lane, the last lane of the list is the target lane that must be reached to follow the Lane Plan.
74 Each point on a Lane Plan can be accessed through dwLanePlanIndex:
77 typedef struct dwLanePlanIndex
79 uint32_t segmentIndex; //!< index of a the lane plan point
80 uint32_t laneIndex; //!< index of lane in the segment
81 uint32_t pointIndex; //!< index of a point in the lane
86 `dwLanePlanIndex` provides a reference into the Lane Plan defined by the segment index, the lane index on the segment, and the point index on the lane.
88 The example image below shows a small Lane Plan with three segments. The first segment has two Lane Plan Lanes, the second segment has three Lane Plan Lanes due to a lane split at the end of the target lane of the first segment. The third segment shows the lane that must be followed to reach the target point (indicated by the red box). So, the first two segments describe where and how many lane changes must be executed to reach the target.