The HD Maps Lane Planner sample demonstrates how to use the NVIDIA® DriveWorks lane planner to compute a lane plan through an HD map from a start point to a target point.
The sample supports the following features:
Lane Planning
The lane planner returns a drivable lane plan from start to target along the lanes of the HD map, with information where lane changes are necessary.
Determines where lanes merge and split
At each point on the lane plan, the lane planner can indicate (when queried) where the next lane merge or lane split occurs when following the lane.
Provides information about vehicle pose
The lane planner provides tracking of a vehicle pose along the lane plan. It uses the following information to find the current point on the lane plan:
Even if the lanes on the plan cross one another, the "current point" consistently moves along the plan and avoids selecting points of the lane plan that are incorrect but close to the current car pose.
The command line for the Lane Planner sample, sample_laneplanner, is:
./sample_laneplanner
To run the sample with a custom map, it can be started with additional arguments:
./sample_laneplanner --map=/path/to/mapfile
And optionally custom initial start and target locations can be specified:
./sample_laneplanner --map=/path/to/mapfile --startLat: default=37.4971 --startLon: default=-122.3132 --targetLat: default=37.5276 --targetLon: default=-122.3314
By default the target is interpreted as the closest lane group. To define the target as the closest lane use the flag:
./sample_laneplanner --useLaneTarget=true
While the application is running the following actions are possible:
Both start and target points can be moved by dragging them with the left mouse button. Intermediate waypoints can be added with left click, removed with 'ctrl + left click' and can also be repositioned by dragging. More waypoints results in a more accurate lane plan and the lane plan is recalculated whenever any of the input points are changed. Waypoints can also be generated from external sources such as Google Maps.
The HD map is rendered with lines of different colors:
The input points are:
The resulting lane plan is visualized by:
Additional info:
For more information, see Maps.