Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::hdmap::HDMap Class Reference

High-precision map loader interface. More...

#include <hdmap.h>

Collaboration diagram for apollo::hdmap::HDMap:
Collaboration graph

Public Member Functions

int LoadMapFromFile (const std::string &map_filename)
 load map from local file More...
 
int LoadMapFromProto (const Map &map_proto)
 load map from a given protobuf message. More...
 
LaneInfoConstPtr GetLaneById (const Id &id) const
 
JunctionInfoConstPtr GetJunctionById (const Id &id) const
 
SignalInfoConstPtr GetSignalById (const Id &id) const
 
CrosswalkInfoConstPtr GetCrosswalkById (const Id &id) const
 
StopSignInfoConstPtr GetStopSignById (const Id &id) const
 
YieldSignInfoConstPtr GetYieldSignById (const Id &id) const
 
ClearAreaInfoConstPtr GetClearAreaById (const Id &id) const
 
SpeedBumpInfoConstPtr GetSpeedBumpById (const Id &id) const
 
OverlapInfoConstPtr GetOverlapById (const Id &id) const
 
RoadInfoConstPtr GetRoadById (const Id &id) const
 
ParkingSpaceInfoConstPtr GetParkingSpaceById (const Id &id) const
 
PNCJunctionInfoConstPtr GetPNCJunctionById (const Id &id) const
 
RSUInfoConstPtr GetRSUById (const Id &id) const
 
int GetLanes (const apollo::common::PointENU &point, double distance, std::vector< LaneInfoConstPtr > *lanes) const
 get all lanes in certain range More...
 
int GetJunctions (const apollo::common::PointENU &point, double distance, std::vector< JunctionInfoConstPtr > *junctions) const
 get all junctions in certain range More...
 
int GetSignals (const apollo::common::PointENU &point, double distance, std::vector< SignalInfoConstPtr > *signals) const
 get all signals in certain range More...
 
int GetCrosswalks (const apollo::common::PointENU &point, double distance, std::vector< CrosswalkInfoConstPtr > *crosswalks) const
 get all crosswalks in certain range More...
 
int GetStopSigns (const apollo::common::PointENU &point, double distance, std::vector< StopSignInfoConstPtr > *stop_signs) const
 get all stop signs in certain range More...
 
int GetYieldSigns (const apollo::common::PointENU &point, double distance, std::vector< YieldSignInfoConstPtr > *yield_signs) const
 get all yield signs in certain range More...
 
int GetClearAreas (const apollo::common::PointENU &point, double distance, std::vector< ClearAreaInfoConstPtr > *clear_areas) const
 get all clear areas in certain range More...
 
int GetSpeedBumps (const apollo::common::PointENU &point, double distance, std::vector< SpeedBumpInfoConstPtr > *speed_bumps) const
 get all speed bumps in certain range More...
 
int GetRoads (const apollo::common::PointENU &point, double distance, std::vector< RoadInfoConstPtr > *roads) const
 get all roads in certain range More...
 
int GetParkingSpaces (const apollo::common::PointENU &point, double distance, std::vector< ParkingSpaceInfoConstPtr > *parking_spaces) const
 get all parking spaces in certain range More...
 
int GetPNCJunctions (const apollo::common::PointENU &point, double distance, std::vector< PNCJunctionInfoConstPtr > *pnc_junctions) const
 get all pnc junctions in certain range More...
 
int GetNearestLane (const apollo::common::PointENU &point, LaneInfoConstPtr *nearest_lane, double *nearest_s, double *nearest_l) const
 get nearest lane from target point, More...
 
int GetNearestLaneWithHeading (const apollo::common::PointENU &point, const double distance, const double central_heading, const double max_heading_difference, LaneInfoConstPtr *nearest_lane, double *nearest_s, double *nearest_l) const
 get the nearest lane within a certain range by pose More...
 
int GetLanesWithHeading (const apollo::common::PointENU &point, const double distance, const double central_heading, const double max_heading_difference, std::vector< LaneInfoConstPtr > *lanes) const
 get all lanes within a certain range by pose More...
 
int GetRoadBoundaries (const apollo::common::PointENU &point, double radius, std::vector< RoadROIBoundaryPtr > *road_boundaries, std::vector< JunctionBoundaryPtr > *junctions) const
 get all road and junctions boundaries within certain range More...
 
int GetRoadBoundaries (const apollo::common::PointENU &point, double radius, std::vector< RoadRoiPtr > *road_boundaries, std::vector< JunctionInfoConstPtr > *junctions) const
 get all road boundaries and junctions within certain range More...
 
int GetRoi (const apollo::common::PointENU &point, double radius, std::vector< RoadRoiPtr > *roads_roi, std::vector< PolygonRoiPtr > *polygons_roi)
 get ROI within certain range More...
 
int GetForwardNearestSignalsOnLane (const apollo::common::PointENU &point, const double distance, std::vector< SignalInfoConstPtr > *signals) const
 get forward nearest signals within certain range on the lane if there are two signals related to one stop line, return both signals. More...
 
int GetStopSignAssociatedStopSigns (const Id &id, std::vector< StopSignInfoConstPtr > *stop_signs) const
 get all other stop signs associated with a stop sign in the same junction More...
 
int GetStopSignAssociatedLanes (const Id &id, std::vector< LaneInfoConstPtr > *lanes) const
 get all lanes associated with a stop sign in the same junction More...
 
int GetLocalMap (const apollo::common::PointENU &point, const std::pair< double, double > &range, Map *local_map) const
 get a local map which is identical to the origin map except that all map elements without overlap with the given region are deleted. More...
 
int GetForwardNearestRSUs (const apollo::common::PointENU &point, double distance, double central_heading, double max_heading_difference, std::vector< RSUInfoConstPtr > *rsus) const
 get forward nearest rsus within certain range More...
 

Detailed Description

High-precision map loader interface.

Member Function Documentation

◆ GetClearAreaById()

ClearAreaInfoConstPtr apollo::hdmap::HDMap::GetClearAreaById ( const Id &  id) const

◆ GetClearAreas()

int apollo::hdmap::HDMap::GetClearAreas ( const apollo::common::PointENU &  point,
double  distance,
std::vector< ClearAreaInfoConstPtr > *  clear_areas 
) const

get all clear areas in certain range

Parameters
pointthe central point of the range
distancethe search radius
clear_areasstore all clear areas in target range
Returns
0:success, otherwise failed

◆ GetCrosswalkById()

CrosswalkInfoConstPtr apollo::hdmap::HDMap::GetCrosswalkById ( const Id &  id) const

◆ GetCrosswalks()

int apollo::hdmap::HDMap::GetCrosswalks ( const apollo::common::PointENU &  point,
double  distance,
std::vector< CrosswalkInfoConstPtr > *  crosswalks 
) const

get all crosswalks in certain range

Parameters
pointthe central point of the range
distancethe search radius
crosswalksstore all crosswalks in target range
Returns
0:success, otherwise failed

◆ GetForwardNearestRSUs()

int apollo::hdmap::HDMap::GetForwardNearestRSUs ( const apollo::common::PointENU &  point,
double  distance,
double  central_heading,
double  max_heading_difference,
std::vector< RSUInfoConstPtr > *  rsus 
) const

get forward nearest rsus within certain range

Parameters
pointthe target position
distancethe forward search distance
central_headingthe base heading
max_heading_differencethe heading range
rsusall rsus that match search conditions
Returns
0:success, otherwise failed

◆ GetForwardNearestSignalsOnLane()

int apollo::hdmap::HDMap::GetForwardNearestSignalsOnLane ( const apollo::common::PointENU &  point,
const double  distance,
std::vector< SignalInfoConstPtr > *  signals 
) const

get forward nearest signals within certain range on the lane if there are two signals related to one stop line, return both signals.

Parameters
pointthe target position
distancethe forward search distance
signalsall signals match conditions
Returns
0:success, otherwise failed

◆ GetJunctionById()

JunctionInfoConstPtr apollo::hdmap::HDMap::GetJunctionById ( const Id &  id) const

◆ GetJunctions()

int apollo::hdmap::HDMap::GetJunctions ( const apollo::common::PointENU &  point,
double  distance,
std::vector< JunctionInfoConstPtr > *  junctions 
) const

get all junctions in certain range

Parameters
pointthe central point of the range
distancethe search radius
junctionsstore all junctions in target range
Returns
0:success, otherwise failed

◆ GetLaneById()

LaneInfoConstPtr apollo::hdmap::HDMap::GetLaneById ( const Id &  id) const

◆ GetLanes()

int apollo::hdmap::HDMap::GetLanes ( const apollo::common::PointENU &  point,
double  distance,
std::vector< LaneInfoConstPtr > *  lanes 
) const

get all lanes in certain range

Parameters
pointthe central point of the range
distancethe search radius
lanesstore all lanes in target range
Returns
0:success, otherwise failed

◆ GetLanesWithHeading()

int apollo::hdmap::HDMap::GetLanesWithHeading ( const apollo::common::PointENU &  point,
const double  distance,
const double  central_heading,
const double  max_heading_difference,
std::vector< LaneInfoConstPtr > *  lanes 
) const

get all lanes within a certain range by pose

Parameters
pointthe target position
distancethe search radius
central_headingthe base heading
max_heading_differencethe heading range
nearest_laneall lanes that match search conditions
Returns
0:success, otherwise, failed.

◆ GetLocalMap()

int apollo::hdmap::HDMap::GetLocalMap ( const apollo::common::PointENU &  point,
const std::pair< double, double > &  range,
Map *  local_map 
) const

get a local map which is identical to the origin map except that all map elements without overlap with the given region are deleted.

Parameters
pointthe target position
rangethe size of local map region, [width, height]
local_maplocal map in proto format
Returns
0:success, otherwise failed

◆ GetNearestLane()

int apollo::hdmap::HDMap::GetNearestLane ( const apollo::common::PointENU &  point,
LaneInfoConstPtr nearest_lane,
double *  nearest_s,
double *  nearest_l 
) const

get nearest lane from target point,

Parameters
pointthe target point
nearest_lanethe nearest lane that match search conditions
nearest_sthe offset from lane start point along lane center line
nearest_lthe lateral offset from lane center line
Returns
0:success, otherwise, failed.

◆ GetNearestLaneWithHeading()

int apollo::hdmap::HDMap::GetNearestLaneWithHeading ( const apollo::common::PointENU &  point,
const double  distance,
const double  central_heading,
const double  max_heading_difference,
LaneInfoConstPtr nearest_lane,
double *  nearest_s,
double *  nearest_l 
) const

get the nearest lane within a certain range by pose

Parameters
pointthe target position
distancethe search radius
central_headingthe base heading
max_heading_differencethe heading range
nearest_lanethe nearest lane that match search conditions
nearest_sthe offset from lane start point along lane center line
nearest_lthe lateral offset from lane center line
Returns
0:success, otherwise, failed.

◆ GetOverlapById()

OverlapInfoConstPtr apollo::hdmap::HDMap::GetOverlapById ( const Id &  id) const

◆ GetParkingSpaceById()

ParkingSpaceInfoConstPtr apollo::hdmap::HDMap::GetParkingSpaceById ( const Id &  id) const

◆ GetParkingSpaces()

int apollo::hdmap::HDMap::GetParkingSpaces ( const apollo::common::PointENU &  point,
double  distance,
std::vector< ParkingSpaceInfoConstPtr > *  parking_spaces 
) const

get all parking spaces in certain range

Parameters
pointthe central point of the range
distancethe search radius
parkingspaces store all clear areas in target range
Returns
0:success, otherwise failed

◆ GetPNCJunctionById()

PNCJunctionInfoConstPtr apollo::hdmap::HDMap::GetPNCJunctionById ( const Id &  id) const

◆ GetPNCJunctions()

int apollo::hdmap::HDMap::GetPNCJunctions ( const apollo::common::PointENU &  point,
double  distance,
std::vector< PNCJunctionInfoConstPtr > *  pnc_junctions 
) const

get all pnc junctions in certain range

Parameters
pointthe central point of the range
distancethe search radius
junctionsstore all junctions in target range
Returns
0:success, otherwise failed

◆ GetRoadBoundaries() [1/2]

int apollo::hdmap::HDMap::GetRoadBoundaries ( const apollo::common::PointENU &  point,
double  radius,
std::vector< RoadROIBoundaryPtr > *  road_boundaries,
std::vector< JunctionBoundaryPtr > *  junctions 
) const

get all road and junctions boundaries within certain range

Parameters
pointthe target position
radiusthe search radius
road_boundariesthe roads' boundaries
junctionsthe junctions' boundaries
Returns
0:success, otherwise failed

◆ GetRoadBoundaries() [2/2]

int apollo::hdmap::HDMap::GetRoadBoundaries ( const apollo::common::PointENU &  point,
double  radius,
std::vector< RoadRoiPtr > *  road_boundaries,
std::vector< JunctionInfoConstPtr > *  junctions 
) const

get all road boundaries and junctions within certain range

Parameters
pointthe target position
radiusthe search radius
road_boundariesthe roads' boundaries
junctionsthe junctions
Returns
0:success, otherwise failed

◆ GetRoadById()

RoadInfoConstPtr apollo::hdmap::HDMap::GetRoadById ( const Id &  id) const

◆ GetRoads()

int apollo::hdmap::HDMap::GetRoads ( const apollo::common::PointENU &  point,
double  distance,
std::vector< RoadInfoConstPtr > *  roads 
) const

get all roads in certain range

Parameters
pointthe central point of the range
distancethe search radius
roadsstore all roads in target range
Returns
0:success, otherwise failed

◆ GetRoi()

int apollo::hdmap::HDMap::GetRoi ( const apollo::common::PointENU &  point,
double  radius,
std::vector< RoadRoiPtr > *  roads_roi,
std::vector< PolygonRoiPtr > *  polygons_roi 
)

get ROI within certain range

Parameters
pointthe target position
radiusthe search radius
roads_roithe roads' boundaries
polygons_roithe junctions' boundaries
Returns
0:success, otherwise failed

◆ GetRSUById()

RSUInfoConstPtr apollo::hdmap::HDMap::GetRSUById ( const Id &  id) const

◆ GetSignalById()

SignalInfoConstPtr apollo::hdmap::HDMap::GetSignalById ( const Id &  id) const

◆ GetSignals()

int apollo::hdmap::HDMap::GetSignals ( const apollo::common::PointENU &  point,
double  distance,
std::vector< SignalInfoConstPtr > *  signals 
) const

get all signals in certain range

Parameters
pointthe central point of the range
distancethe search radius
signalsstore all signals in target range
Returns
0:success, otherwise failed

◆ GetSpeedBumpById()

SpeedBumpInfoConstPtr apollo::hdmap::HDMap::GetSpeedBumpById ( const Id &  id) const

◆ GetSpeedBumps()

int apollo::hdmap::HDMap::GetSpeedBumps ( const apollo::common::PointENU &  point,
double  distance,
std::vector< SpeedBumpInfoConstPtr > *  speed_bumps 
) const

get all speed bumps in certain range

Parameters
pointthe central point of the range
distancethe search radius
speed_bumpsstore all speed bumps in target range
Returns
0:success, otherwise failed

◆ GetStopSignAssociatedLanes()

int apollo::hdmap::HDMap::GetStopSignAssociatedLanes ( const Id &  id,
std::vector< LaneInfoConstPtr > *  lanes 
) const

get all lanes associated with a stop sign in the same junction

Parameters
idid of stop sign
lanesall lanes match conditions
Returns
0:success, otherwise failed

◆ GetStopSignAssociatedStopSigns()

int apollo::hdmap::HDMap::GetStopSignAssociatedStopSigns ( const Id &  id,
std::vector< StopSignInfoConstPtr > *  stop_signs 
) const

get all other stop signs associated with a stop sign in the same junction

Parameters
idid of stop sign
stop_signsstop signs associated
Returns
0:success, otherwise failed

◆ GetStopSignById()

StopSignInfoConstPtr apollo::hdmap::HDMap::GetStopSignById ( const Id &  id) const

◆ GetStopSigns()

int apollo::hdmap::HDMap::GetStopSigns ( const apollo::common::PointENU &  point,
double  distance,
std::vector< StopSignInfoConstPtr > *  stop_signs 
) const

get all stop signs in certain range

Parameters
pointthe central point of the range
distancethe search radius
stopsigns store all stop signs in target range
Returns
0:success, otherwise failed

◆ GetYieldSignById()

YieldSignInfoConstPtr apollo::hdmap::HDMap::GetYieldSignById ( const Id &  id) const

◆ GetYieldSigns()

int apollo::hdmap::HDMap::GetYieldSigns ( const apollo::common::PointENU &  point,
double  distance,
std::vector< YieldSignInfoConstPtr > *  yield_signs 
) const

get all yield signs in certain range

Parameters
pointthe central point of the range
distancethe search radius
yieldsigns store all yield signs in target range
Returns
0:success, otherwise failed

◆ LoadMapFromFile()

int apollo::hdmap::HDMap::LoadMapFromFile ( const std::string &  map_filename)

load map from local file

Parameters
map_filenamepath of map data file
Returns
0:success, otherwise failed

◆ LoadMapFromProto()

int apollo::hdmap::HDMap::LoadMapFromProto ( const Map &  map_proto)

load map from a given protobuf message.

Parameters
map_protomap data in protobuf format
Returns
0:success, otherwise failed

The documentation for this class was generated from the following file: