31 #ifndef DW_PLANNING_LANEPLANNER_H_ 32 #define DW_PLANNING_LANEPLANNER_H_ 219 uint32_t laneChangeCount,
222 uint32_t gpsPathPointCount,
261 uint32_t targetLaneCount,
263 uint32_t gpsPathPointCount,
267 dwLanePlanHandle_t lanePlan,
268 dwLanePlannerHandle_t lanePlanner);
282 dwConstLanePlanHandle_t lanePlanHandle);
331 dwConstLanePlanHandle_t lanePlan);
358 dwLanePlanHandle_t lanePlan);
377 uint32_t increaseCount,
378 dwConstLanePlanHandle_t lanePlan);
396 uint32_t decreaseCount,
397 dwConstLanePlanHandle_t lanePlan);
466 dwConstLanePlanHandle_t lanePlan);
490 dwLanePlanHandle_t lanePlan);
515 dwLanePlanHandle_t lanePlan);
539 dwLanePlanHandle_t lanePlan);
564 dwLanePlanHandle_t lanePlan);
588 dwLanePlanHandle_t lanePlan);
614 dwLanePlanHandle_t lanePlan)
615 DW_DEPRECATED(
"WARNING: the function will be removed in the next major release, use dwLanePlan_getLanePlanActionsNew.");
644 dwLanePlanHandle_t lanePlan);
667 dwLanePlanHandle_t lanePlan);
672 dwConstLanePlanHandle_t lanePlan);
693 uint32_t* totalLaneSplitCount,
694 uint32_t* totalLaneMergeCount,
695 dwLanePlanHandle_t lanePlan);
729 dwLanePlanHandle_t lanePlan);
759 dwLanePlanHandle_t lanePlan);
792 dwLanePlanHandle_t lanePlan);
809 dwConstLanePlanHandle_t lanePlan);
826 dwConstLanePlanHandle_t lanePlan);
846 dwConstLanePlanHandle_t lanePlan);
877 dwConstLanePlanHandle_t lanePlanHandle);
896 uint32_t* laneChangeIndex,
898 dwLanePlanHandle_t lanePlan);
906 #endif // DW_PLANNING_LANEPLANNER_LANEPLANNER_H_ float32_t laneChangeLength
available distance to do the lane change.
uint32_t lanePlanLaneIndex
index of a dwLanePlanLane in the dwLanePlanSegment
dwMapsLaneMerge laneMerge
bool hasLaneMerge
true only if a valid lane merge ahead is detected
DW_API_PUBLIC dwStatus dwLanePlan_getTargetLanes(dwMapsLanePtrBuffer *lanes, uint32_t *laneChangeIndex, float32_t distance, dwLanePlanHandle_t lanePlan)
Get target lane ptrs e.g.
DW_API_PUBLIC dwStatus dwLanePlan_findClosestPoint(dwMapsGeoPoint *closestPoint, dwLanePlanIndex *lanePlanIndex, const dwMapsGeoPoint *gps, bool ignoreHeight, dwLanePlanHandle_t lanePlan)
Helper function to find the closest line segment on the lane plan to a given gps location, together with the corresponding closest lane plan point (the closer of the two lane plan points on the line segment that contains the closest geometric point).
const dwMapsLane ** lanes
Pointers to the sequential dwMapsLane's.
DW_API_PUBLIC dwStatus dwLanePlan_getCurrentGeoPoint(dwMapsGeoPoint *pointOnLanePlan, dwConstLanePlanHandle_t lanePlan)
Get current point on the lane plan in gps coordinates.
float float32_t
Specifies POD types.
float32_t(* dwLanePlannerCostFunction_t)(const dwMapsLane *lane, bool forward, float32_t length, uint32_t laneChangeCount, dwMapsSide laneChangeSide, const dwMapsGeoPoint *gpsPathPoint, uint32_t gpsPathPointCount, bool ignoreHeight, const dwMapsLane *neighborLane, void *context)
Cost function that allows to implement a custom cost calculation in the dijkstra algorithm that calcu...
DW_API_PUBLIC dwStatus dwLanePlan_getNextLaneSplit(dwLanePlanIndex *laneSplitPointIndex, dwMapsLaneSplitDetails *laneSplit, float32_t *distance, dwLanePlanHandle_t lanePlan)
Get next lane split.
Lane defined by a polyline, with lane attributes.
DW_API_PUBLIC dwStatus dwLanePlan_updateCurrentPointWithGlobalPose(const dwMapsGeoPoint *gps, const dwMatrix3d *localToENURotation33, dwTime_t timestamp, bool ignoreHeight, dwLanePlanHandle_t lanePlan)
Update the current point on the lane plan based on a pose defined in absolute coordinates.
DW_API_PUBLIC dwStatus dwLanePlan_getLanePlanActions(dwLanePlanIndex *laneChangePointIndex, dwLanePlanIndex *laneSplitPointIndex, dwLanePlanActions *lanePlanActionInfo, dwLanePlanHandle_t lanePlan)
Get information about the next lane change and lane split.
DW_API_PUBLIC dwStatus dwLanePlanner_release(dwLanePlannerHandle_t lanePlanner)
Release a lane planner object.
A lane plan segment is a segment along the lane plan with a consistent lane change situation...
Defines a three-element floating-point vector.
DW_API_PUBLIC dwStatus dwLanePlan_getCurrentIndex(dwLanePlanIndex *lanePlanIndex, dwConstLanePlanHandle_t lanePlan)
Get the index to the current point on the lane plan.
DW_API_PUBLIC dwStatus dwLanePlan_getLanePlanSplitMergeDetails(dwMapsLaneSplitDetails *laneSplit, dwMapsLaneMergeDetails *laneMerge, dwLanePlanHandle_t lanePlan)
Get information about the next lane change, lane split, and lane merge.
A lane plan consist of a list of segments that describe how to get from a source lane to a target lan...
DW_API_PUBLIC dwStatus dwLanePlan_getNextLaneMergeAt(dwLanePlanIndex *laneMergePointIndex, dwMapsLaneMergeDetails *laneMerge, const dwLanePlanIndex *queryPointIndex, dwLanePlanHandle_t lanePlan)
Get the next lane merge happening on the lane plan at or after given lane plan index.
DW_API_PUBLIC dwStatus dwLanePlan_computeDistance(float32_t *distance, const dwLanePlanIndex *index1, const dwLanePlanIndex *index2, dwConstLanePlanHandle_t lanePlan)
DW_API_PUBLIC dwStatus dwLanePlan_initialize(dwLanePlanHandle_t *lanePlan, dwConstLanePlannerHandle_t lanePlanner)
Creates a lane plan object and returns a handle to it.
dwLanePlanLaneChange laneChange
DW_API_PUBLIC dwStatus dwLanePlanner_initialize(dwLanePlannerHandle_t *lanePlanner, float32_t maxPlanLengthMeters, dwConstMapHandle_t map)
Creates a lane planner object and returns a handle to it.
struct dwLanePlanObject * dwLanePlanHandle_t
DW_API_PUBLIC dwStatus dwLanePlan_containsLane(bool *isOnLanePlan, const dwMapsLane *lane, dwConstLanePlanHandle_t lanePlan)
Check whether a given dwMapsLane is part of the lane plan.
DW_API_PUBLIC dwStatus dwLanePlan_updateCurrentPointWithLocalPose(const dwMapsRoadSegment *referenceRoadSegment, const dwVector3f *position, const dwMatrix3d *localToENURotation33, dwTime_t timestamp, dwLanePlanHandle_t lanePlan)
Update the current point on the lane plan based on a pose defined in relative coordinates.
Lane merge on a lane plan.
NVIDIA DriveWorks API: Maps
DW_API_PUBLIC dwStatus dwLanePlan_release(dwLanePlanHandle_t lanePlan)
Release a lane plan object.
const dwLanePlanLane * lanes
List of parallel lanes.
DW_API_PUBLIC dwStatus dwLanePlanner_run(const dwMapsLane *startLane, const dwMapsLane *const *targetLanes, uint32_t targetLaneCount, const dwMapsGeoPoint *gpsPathPoints, uint32_t gpsPathPointCount, bool ignoreHeight, dwLanePlannerCostFunction_t costFn, void *costFnContext, dwLanePlanHandle_t lanePlan, dwLanePlannerHandle_t lanePlanner)
Create a lane plan along the provided gps path points, based on the map that is given at initializati...
DW_API_PUBLIC dwStatus dwLanePlan_getNextLaneChange(dwLanePlanIndex *laneChangePointIndex, dwLanePlanLaneChange *laneChange, float32_t *distance, dwLanePlanHandle_t lanePlan)
Get next lane change.
struct dwLanePlannerObject const * dwConstLanePlannerHandle_t
DW_API_PUBLIC dwStatus dwLanePlan_getPoint(dwMapsGeoPoint *pointWGS84, dwVector3f *pointLocal, const dwMapsLane **lane, dwTime_t *time, const dwLanePlanIndex *index, dwConstLanePlanHandle_t lanePlan)
Get point data from lane plan at given index.
dwStatus
Status definition.
const dwTime_t * times
Estimated time of arrival in [us] per dwMapsLane.
DW_API_PUBLIC dwStatus dwLanePlan_getLanePlanActionsNew(dwLanePlanIndex *laneChangePointIndex, dwLanePlanIndex *laneSplitPointIndex, dwLanePlanIndex *laneMergePointIndex, dwLanePlanActions *lanePlanActionInfo, dwLanePlanHandle_t lanePlan)
Get information about the next lane change, lane split, and lane merge.
uint32_t mapsLaneIndex
index of a dwMapsLane in the dwLanePlanLane
Location point defined by WGS84 coordinates.
dwMapsSide
Enum for sides.
Lane merge on a lane plan.
dwMapsLaneSplit laneSplit
DW_API_PUBLIC dwStatus dwLanePlan_updateCurrentPointWithCurrentRoadSegment(const dwMapsRoadSegment *currentRoadSegment, const dwVector3f *position, const dwMatrix3d *localToENURotation33, dwTime_t timestamp, dwLanePlanHandle_t lanePlan)
Update the current point on the lane plan based on a pose defined in relative coordinates.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
uint32_t laneCount
Number of dwMapsLanes.
const bool * laneForward
Whether to move forward on lane geometry, per dwMapsLane.
DW_API_PUBLIC dwStatus dwLanePlan_getNextLaneChangeAt(dwLanePlanIndex *laneChangePointIndex, dwLanePlanLaneChange *laneChange, const dwLanePlanIndex *queryPointIndex, dwConstLanePlanHandle_t lanePlan)
Get the next lane change happening on the lane plan at or after given lane plan index.
struct dwLanePlanObject const * dwConstLanePlanHandle_t
#define DW_DEPRECATED(msg)
Structure that packages lane change, lane split, and lane merge info together.
uint32_t pointIndex
index of a point in the dwMapsLane geometry
struct dwLanePlannerObject * dwLanePlannerHandle_t
dwMapsSide laneChangeSide
side towards the lane change is going
bool hasLaneChange
true only if a valid lane change ahead is detected
Defines a 3x3 matrix of double floating point numbers.
DW_API_PUBLIC dwStatus dwLanePlan_getCurrentPoint(const dwMapsRoadSegment **referenceRoadSegment, dwVector3f *pointOnLanePlan, dwConstLanePlanHandle_t lanePlan)
Get current point on the lane plan in coordinates relative to a reference road segment.
float32_t distToDestination
distance to reach destination on the lane plan
uint32_t laneChangeCount
number of lanes that need to be changed
const float32_t * distances
Distance in [m] to beginning of each dwMapsLane.
uint32_t segmentCount
Number segments in lane plan.
DW_API_PUBLIC dwStatus dwLanePlan_increaseIndex(dwLanePlanIndex *lanePlanIndex, uint32_t increaseCount, dwConstLanePlanHandle_t lanePlan)
Helper function to compute the next lane plan point along a lane plan.
struct dwMapObject const * dwConstMapHandle_t
uint32_t segmentIndex
index of a dwLanePlanSegment in the dwLanePlan
DW_API_PUBLIC dwStatus dwLanePlan_getEstimatedArrivalInfo(float32_t *distToDestination, float32_t *timeToDestination, dwConstLanePlanHandle_t lanePlanHandle)
Get estimated time and distance to reach the end of the lane plan from current position.
DW_API_PUBLIC dwStatus dwLanePlan_decreaseIndex(dwLanePlanIndex *lanePlanIndex, uint32_t decreaseCount, dwConstLanePlanHandle_t lanePlan)
Helper function to compute the previous lane plan point on a lane plan.
DW_API_PUBLIC dwStatus dwLanePlan_initializeLanePlanActions(dwLanePlanActions *lpActions)
Default initialize a dwLanePlanActions object.
bool hasLaneSplit
true only if a valid lane split ahead is detected
DW_API_PUBLIC dwStatus dwLanePlan_getNextLaneMerge(dwLanePlanIndex *laneMergePointIndex, dwMapsLaneMergeDetails *laneMerge, float32_t *distance, dwLanePlanHandle_t lanePlan)
Get next lane merge.
DW_API_PUBLIC dwStatus dwLanePlan_get(dwLanePlan *lanePlan, dwConstLanePlanHandle_t lanePlanHandle)
Retrieve the result of a previous 'dwLanePlanner_run' call.
Lane change state on the lane plan.
const dwLanePlanSegment * segments
List of segments along the lane plan.
Index defining a point in the lane plan.
Lane split on a lane plan.
DW_API_PUBLIC dwStatus dwLanePlan_getComplexity(uint32_t *totalLaneChangeCount, uint32_t *totalLaneSplitCount, uint32_t *totalLaneMergeCount, dwLanePlanHandle_t lanePlan)
Returns some numbers that indicate how complex it is to autonomously drive a given lane plan...
float32_t timeToDestination
estimated time to reach destination on the lane plan
Lane split on a lane plan.
float32_t laneChangeDist
distance to where the next lane change action takes place (start of the next lane change...
A lane plan lane is a sequence of dwMapsLane's, with additional information per dwMapsLane about movi...
Road Segment represents an atomic element of the core layer of a Map.
User provided buffer of dwMapsLane pointers.
float32_t laneMergeDist
distance to the next lane merge point
DW_API_PUBLIC dwStatus dwLanePlan_getNextLaneSplitAt(dwLanePlanIndex *laneSplitPointIndex, dwMapsLaneSplitDetails *laneSplit, const dwLanePlanIndex *queryPointIndex, dwLanePlanHandle_t lanePlan)
Get the next lane split happening on the lane plan at or after given lane plan index.