Apollo 10.0
自动驾驶开放平台
apollo::hdmap 命名空间参考

apollo::hdmap 更多...

命名空间

namespace  adapter
 

class  Alignment
 
class  AlignmentAgent
 
struct  Area
 
class  AreaInfo
 
struct  BadOrGoodPoseInfo
 
struct  BarrierGate
 
class  BarrierGateInfo
 
struct  BoundaryEdge
 
struct  BoundaryPolygon
 
struct  Centroid3D
 
class  ChannelChecker
 
class  ChannelVerify
 
class  ChannelVerifyAgent
 
struct  ChannelVerifyRequest
 
struct  ChannelVerifyResponse
 
struct  ClearArea
 
class  ClearAreaInfo
 
class  Client
 
struct  Crosswalk
 
class  CrosswalkInfo
 
struct  Curve
 
struct  CurveSegment
 
struct  CyberRecordChannel
 
struct  CyberRecordInfo
 
struct  DynamicAlignRequest
 
struct  DynamicAlignResponse
 
class  EightRoute
 
struct  EightRouteRequest
 
struct  EightRouteResponse
 
class  ExceptionHandler
 
struct  FramePose
 
struct  FrameRate
 
struct  GridMeta
 
class  HDMap
 High-precision map loader interface. 更多...
 
class  HDMapImpl
 High-precision map loader implement. 更多...
 
class  HDMapUtil
 
struct  Header
 
struct  Id
 
class  InterpolatedIndex
 
struct  JsonConf
 
struct  Junction
 
struct  JunctionBoundary
 
class  JunctionInfo
 
struct  Lane
 
struct  LaneBoundary
 
struct  LaneBoundaryType
 
class  LaneInfo
 
struct  LaneSampleAssociation
 
struct  LaneSegment
 
struct  LaneWaypoint
 
class  LapsChecker
 
struct  LineBoundary
 
struct  LineSegment
 
struct  LoopResult
 
class  LoopsChecker
 
class  LoopsVerifyAgent
 
struct  LoopsVerifyRequest
 
struct  LoopsVerifyResponse
 
struct  Map
 
class  Mapdatachecker
 
class  MapDataCheckerAgent
 
class  MapDataCheckerCyberNode
 
class  MapPathPoint
 
class  MapUtil
 
class  ObjectWithAABox
 
struct  OneRecordChannelCheckResult
 
class  OverlapInfo
 
struct  ParkingLot
 
struct  ParkingSpace
 
class  ParkingSpaceInfo
 
struct  Passage
 
struct  PassageGroup
 
class  Path
 
class  PathApproximation
 
struct  PathOverlap
 
class  PJTransformer
 
struct  PNCJunction
 
class  PNCJunctionInfo
 
struct  Point3d
 
struct  Polygon
 
struct  PolygonBoundary
 
struct  PolygonRoi
 
class  PoseCollection
 
class  PoseCollectionAgent
 
struct  Projection
 
struct  Road
 
struct  RoadBoundary
 
class  RoadInfo
 
struct  RoadRoi
 
struct  RoadROIBoundary
 
struct  RoadSection
 
struct  RoiAttribute
 
class  RouteSegments
 class RouteSegments 更多...
 
struct  RSU
 
class  RSUInfo
 
struct  Signal
 
class  SignalInfo
 
struct  SignInfo
 
struct  SpeedBump
 
class  SpeedBumpInfo
 
struct  SpeedControl
 
struct  SpeedControls
 
class  StaticAlign
 
struct  StaticAlignRequest
 
struct  StaticAlignResponse
 
struct  StopSign
 
class  StopSignInfo
 
struct  Subsignal
 
struct  TopicResult
 
struct  VerifyRange
 
struct  VerifyResult
 
struct  YieldSign
 
class  YieldSignInfo
 

类型定义

using LaneSegmentBox = ObjectWithAABox< LaneInfo, apollo::common::math::LineSegment2d >
 
using LaneSegmentKDTree = apollo::common::math::AABoxKDTree2d< LaneSegmentBox >
 
using OverlapInfoConstPtr = std::shared_ptr< const OverlapInfo >
 
using LaneInfoConstPtr = std::shared_ptr< const LaneInfo >
 
using JunctionInfoConstPtr = std::shared_ptr< const JunctionInfo >
 
using SignalInfoConstPtr = std::shared_ptr< const SignalInfo >
 
using CrosswalkInfoConstPtr = std::shared_ptr< const CrosswalkInfo >
 
using StopSignInfoConstPtr = std::shared_ptr< const StopSignInfo >
 
using YieldSignInfoConstPtr = std::shared_ptr< const YieldSignInfo >
 
using ClearAreaInfoConstPtr = std::shared_ptr< const ClearAreaInfo >
 
using SpeedBumpInfoConstPtr = std::shared_ptr< const SpeedBumpInfo >
 
using RoadInfoConstPtr = std::shared_ptr< const RoadInfo >
 
using ParkingSpaceInfoConstPtr = std::shared_ptr< const ParkingSpaceInfo >
 
using RoadROIBoundaryPtr = std::shared_ptr< RoadROIBoundary >
 
using PolygonRoiPtr = std::shared_ptr< PolygonRoi >
 
using RoadRoiPtr = std::shared_ptr< RoadRoi >
 
using PNCJunctionInfoConstPtr = std::shared_ptr< const PNCJunctionInfo >
 
using RSUInfoConstPtr = std::shared_ptr< const RSUInfo >
 
using AreaInfoConstPtr = std::shared_ptr< const AreaInfo >
 
using BarrierGateInfoConstPtr = std::shared_ptr< const BarrierGateInfo >
 
using JunctionPolygonBox = ObjectWithAABox< JunctionInfo, apollo::common::math::Polygon2d >
 
using JunctionPolygonKDTree = apollo::common::math::AABoxKDTree2d< JunctionPolygonBox >
 
using AreaPolygonBox = ObjectWithAABox< AreaInfo, apollo::common::math::Polygon2d >
 
using AreaPolygonKDTree = apollo::common::math::AABoxKDTree2d< AreaPolygonBox >
 
using SignalSegmentBox = ObjectWithAABox< SignalInfo, apollo::common::math::LineSegment2d >
 
using SignalSegmentKDTree = apollo::common::math::AABoxKDTree2d< SignalSegmentBox >
 
using BarrierGateSegmentBox = ObjectWithAABox< BarrierGateInfo, apollo::common::math::LineSegment2d >
 
using BarrierGateSegmentKDTree = apollo::common::math::AABoxKDTree2d< BarrierGateSegmentBox >
 
using CrosswalkPolygonBox = ObjectWithAABox< CrosswalkInfo, apollo::common::math::Polygon2d >
 
using CrosswalkPolygonKDTree = apollo::common::math::AABoxKDTree2d< CrosswalkPolygonBox >
 
using StopSignSegmentBox = ObjectWithAABox< StopSignInfo, apollo::common::math::LineSegment2d >
 
using StopSignSegmentKDTree = apollo::common::math::AABoxKDTree2d< StopSignSegmentBox >
 
using YieldSignSegmentBox = ObjectWithAABox< YieldSignInfo, apollo::common::math::LineSegment2d >
 
using YieldSignSegmentKDTree = apollo::common::math::AABoxKDTree2d< YieldSignSegmentBox >
 
using ClearAreaPolygonBox = ObjectWithAABox< ClearAreaInfo, apollo::common::math::Polygon2d >
 
using ClearAreaPolygonKDTree = apollo::common::math::AABoxKDTree2d< ClearAreaPolygonBox >
 
using SpeedBumpSegmentBox = ObjectWithAABox< SpeedBumpInfo, apollo::common::math::LineSegment2d >
 
using SpeedBumpSegmentKDTree = apollo::common::math::AABoxKDTree2d< SpeedBumpSegmentBox >
 
using ParkingSpacePolygonBox = ObjectWithAABox< ParkingSpaceInfo, apollo::common::math::Polygon2d >
 
using ParkingSpacePolygonKDTree = apollo::common::math::AABoxKDTree2d< ParkingSpacePolygonBox >
 
using PNCJunctionPolygonBox = ObjectWithAABox< PNCJunctionInfo, apollo::common::math::Polygon2d >
 
using PNCJunctionPolygonKDTree = apollo::common::math::AABoxKDTree2d< PNCJunctionPolygonBox >
 
using JunctionBoundaryPtr = std::shared_ptr< JunctionBoundary >
 
typedef struct apollo::hdmap::BadOrGoodPoseInfo BadOrGoodPoseInfo
 
typedef State AlignmentAgentState
 
typedef std::shared_ptr< std::vector< OneRecordChannelCheckResult > > CheckedResult
 
typedef std::vector< OneRecordChannelCheckResult >::iterator CheckResultIterator
 
typedef unsigned char uchar
 
typedef std::vector< GridMetaGrid
 
typedef struct apollo::hdmap::Point3d Point3d
 
typedef struct apollo::hdmap::Centroid3D Centroid3D
 

枚举

enum class  PolygonType { JUNCTION_POLYGON = 0 , PARKINGSPACE_POLYGON = 1 , ROAD_HOLE_POLYGON = 2 }
 
enum  CmdType { START = 1 , CHECK = 2 , STOP = 3 }
 
enum  DataType { MAP_MAKING = 1 , MAP_CHECKOUT = 2 }
 
enum  ErrorCode {
  SUCCESS = 0 , ERROR = 1 , ERROR_REQUEST = 2 , ERROR_SERVICE_NO_RESPONSE = 3 ,
  ERROR_REPEATED_START = 4 , ERROR_CHECK_BEFORE_START = 5 , ERROR_GPSBIN_LACK = 101 , ERROR_DISKINFO_ERROR = 102 ,
  ERROR_DISK_UNMOUNT = 103 , ERROR_SPEED_LACK = 105 , WARNING_ODOMETER_LACK = 106 , ERROR_RTKSTATUS_EMPTY = 107 ,
  ERROR_MAPGRPC_NOT_CONNECT = 201 , WARNING_NOT_STRAIGHT = 212 , WARNING_PROGRESS_ROLLBACK = 213 , ERROR_NOT_EIGHT_ROUTE = 221 ,
  ERROR_CHANNEL_VERIFY_TOPIC_LACK = 231 , ERROR_CHANNEL_VERIFY_RATES_ABNORMAL = 232 , ERROR_VERIFY_NO_RECORDERS = 233 , ERROR_LOOPS_NOT_REACHED = 234 ,
  ERROR_VERIFY_NO_GNSSPOS = 235 , ERROR_NOT_STATIC = 241 , ERROR_GNSS_SIGNAL_FAIL = 242 , SUCCESS_TASK_EMPTY = 301 ,
  SUCCESS_TASK_STOCK = 302
}
 
enum class  ChannelVerifyAgentState { IDLE , RUNNING }
 
enum class  State { IDLE , RUNNING }
 
enum class  LoopsVerifyAgentState { IDLE , RUNNING }
 
enum class  PoseCollectionState { IDLE , RUNNING }
 
enum class  StaticAlignDetectMethod { RANSAC , DYNAMIC_CENTROID }
 

函数

std::string BaseMapFile ()
 get base map file path from flags.
 
std::string SimMapFile ()
 get simulation map file path from flags.
 
std::string RoutingMapFile ()
 get routing map file path from flags.
 
std::unique_ptr< HDMapCreateMap (const std::string &map_file_path)
 
std::unique_ptr< HDMapCreateMap (const MapMsg &map_msg)
 
std::string EndWayPointFile ()
 get end way point file path from flags.
 
std::string DefaultRoutingFile ()
 get default routing file path from flags.
 
std::string ParkGoRoutingFile ()
 get park and go routings file path from flags.
 
apollo::hdmap::Id MakeMapId (const std::string &id)
 create a Map ID given a string.
 
LaneBoundaryType::Type LeftBoundaryType (const LaneWaypoint &waypoint)
 get left boundary type at a waypoint.
 
LaneBoundaryType::Type RightBoundaryType (const LaneWaypoint &waypoint)
 get left boundary type at a waypoint.
 
LaneWaypoint LeftNeighborWaypoint (const LaneWaypoint &waypoint)
 get left neighbor lane waypoint.
 
LaneWaypoint RightNeighborWaypoint (const LaneWaypoint &waypoint)
 get left neighbor lane waypoint.
 
std::vector< std::string > GetFileLines (const std::string &path)
 
double UnixNow ()
 
 DEFINE_string (stage, "", "data acquisition stage")
 
 DEFINE_string (cmd, "start", "command corresponding to stage")
 
 DEFINE_string (record_path, "", "record path")
 
 DEFINE_string (client_conf_yaml, "modules/map/tools/map_datachecker/client/conf/client.yaml", "client configurations")
 
 DECLARE_string (stage)
 
 DECLARE_string (cmd)
 
 DECLARE_string (record_path)
 
 DECLARE_string (client_conf_yaml)
 
std::shared_ptr< JsonConfParseJson (std::string conf_path)
 
double GetYaw (double from_x, double from_y, double to_x, double to_y)
 
 DEFINE_string (map_datachecker_host, "127.0.0.1", "the grpc server host")
 
 DEFINE_string (map_datachecker_port, "50100", "the grpc server port")
 
 DEFINE_string (topic_bestgnsspos, "/apollo/sensor/gnss/best_pose", "")
 
 DEFINE_string (conf_json, "modules/map/tools/map_datachecker/server/conf/" "map-datachecker.json", "configure file")
 
 DECLARE_string (map_datachecker_host)
 
 DECLARE_string (map_datachecker_port)
 
 DECLARE_string (topic_bestgnsspos)
 
 DECLARE_string (conf_json)
 
std::ostream & operator<< (std::ostream &os, const ::google::protobuf::RepeatedPtrField< apollo::hdmap::Id > &ids)
 
apollo::common::PointENU SLToXYZ (const std::string &lane_id, const double s, const double l)
 
void XYZToSL (const apollo::common::PointENU &point, std::string *lane_id, double *s, double *l)
 
double XYZDistance (const apollo::common::PointENU &p1, const apollo::common::PointENU &p2)
 
void RefreshDefaultEndPoint ()
 

变量

constexpr double kRADIANS_TO_DEGREES = 180.0 / M_PI
 
constexpr double kDEGRESS_TO_RADIANS = M_PI / 180.0
 

详细描述

类型定义说明

◆ AlignmentAgentState

◆ AreaInfoConstPtr

using apollo::hdmap::AreaInfoConstPtr = typedef std::shared_ptr<const AreaInfo>

在文件 hdmap_common.h145 行定义.

◆ AreaPolygonBox

◆ AreaPolygonKDTree

◆ BadOrGoodPoseInfo

◆ BarrierGateInfoConstPtr

using apollo::hdmap::BarrierGateInfoConstPtr = typedef std::shared_ptr<const BarrierGateInfo>

在文件 hdmap_common.h146 行定义.

◆ BarrierGateSegmentBox

◆ BarrierGateSegmentKDTree

◆ Centroid3D

◆ CheckedResult

typedef std::shared_ptr<std::vector<OneRecordChannelCheckResult> > apollo::hdmap::CheckedResult

在文件 channel_verify.h54 行定义.

◆ CheckResultIterator

在文件 channel_verify.h55 行定义.

◆ ClearAreaInfoConstPtr

using apollo::hdmap::ClearAreaInfoConstPtr = typedef std::shared_ptr<const ClearAreaInfo>

在文件 hdmap_common.h136 行定义.

◆ ClearAreaPolygonBox

◆ ClearAreaPolygonKDTree

◆ CrosswalkInfoConstPtr

using apollo::hdmap::CrosswalkInfoConstPtr = typedef std::shared_ptr<const CrosswalkInfo>

在文件 hdmap_common.h133 行定义.

◆ CrosswalkPolygonBox

◆ CrosswalkPolygonKDTree

◆ Grid

typedef std::vector<GridMeta> apollo::hdmap::Grid

在文件 laps_checker.h33 行定义.

◆ JunctionBoundaryPtr

using apollo::hdmap::JunctionBoundaryPtr = typedef std::shared_ptr<JunctionBoundary>

在文件 hdmap_common.h587 行定义.

◆ JunctionInfoConstPtr

using apollo::hdmap::JunctionInfoConstPtr = typedef std::shared_ptr<const JunctionInfo>

在文件 hdmap_common.h131 行定义.

◆ JunctionPolygonBox

◆ JunctionPolygonKDTree

◆ LaneInfoConstPtr

using apollo::hdmap::LaneInfoConstPtr = typedef std::shared_ptr<const LaneInfo>

在文件 hdmap_common.h130 行定义.

◆ LaneSegmentBox

◆ LaneSegmentKDTree

◆ OverlapInfoConstPtr

using apollo::hdmap::OverlapInfoConstPtr = typedef std::shared_ptr<const OverlapInfo>

在文件 hdmap_common.h129 行定义.

◆ ParkingSpaceInfoConstPtr

using apollo::hdmap::ParkingSpaceInfoConstPtr = typedef std::shared_ptr<const ParkingSpaceInfo>

在文件 hdmap_common.h139 行定义.

◆ ParkingSpacePolygonBox

◆ ParkingSpacePolygonKDTree

◆ PNCJunctionInfoConstPtr

using apollo::hdmap::PNCJunctionInfoConstPtr = typedef std::shared_ptr<const PNCJunctionInfo>

在文件 hdmap_common.h143 行定义.

◆ PNCJunctionPolygonBox

◆ PNCJunctionPolygonKDTree

◆ Point3d

◆ PolygonRoiPtr

using apollo::hdmap::PolygonRoiPtr = typedef std::shared_ptr<PolygonRoi>

在文件 hdmap_common.h141 行定义.

◆ RoadInfoConstPtr

using apollo::hdmap::RoadInfoConstPtr = typedef std::shared_ptr<const RoadInfo>

在文件 hdmap_common.h138 行定义.

◆ RoadROIBoundaryPtr

using apollo::hdmap::RoadROIBoundaryPtr = typedef std::shared_ptr<RoadROIBoundary>

在文件 hdmap_common.h140 行定义.

◆ RoadRoiPtr

using apollo::hdmap::RoadRoiPtr = typedef std::shared_ptr<RoadRoi>

在文件 hdmap_common.h142 行定义.

◆ RSUInfoConstPtr

using apollo::hdmap::RSUInfoConstPtr = typedef std::shared_ptr<const RSUInfo>

在文件 hdmap_common.h144 行定义.

◆ SignalInfoConstPtr

using apollo::hdmap::SignalInfoConstPtr = typedef std::shared_ptr<const SignalInfo>

在文件 hdmap_common.h132 行定义.

◆ SignalSegmentBox

◆ SignalSegmentKDTree

◆ SpeedBumpInfoConstPtr

using apollo::hdmap::SpeedBumpInfoConstPtr = typedef std::shared_ptr<const SpeedBumpInfo>

在文件 hdmap_common.h137 行定义.

◆ SpeedBumpSegmentBox

◆ SpeedBumpSegmentKDTree

◆ StopSignInfoConstPtr

using apollo::hdmap::StopSignInfoConstPtr = typedef std::shared_ptr<const StopSignInfo>

在文件 hdmap_common.h134 行定义.

◆ StopSignSegmentBox

◆ StopSignSegmentKDTree

◆ uchar

typedef unsigned char apollo::hdmap::uchar

在文件 common.h40 行定义.

◆ YieldSignInfoConstPtr

using apollo::hdmap::YieldSignInfoConstPtr = typedef std::shared_ptr<const YieldSignInfo>

在文件 hdmap_common.h135 行定义.

◆ YieldSignSegmentBox

◆ YieldSignSegmentKDTree

枚举类型说明

◆ ChannelVerifyAgentState

枚举值
IDLE 
RUNNING 

在文件 channel_verify_agent.h34 行定义.

◆ CmdType

枚举值
START 
CHECK 
STOP 

在文件 collection_check_message.proto7 行定义.

7 {
8 START = 1;
9 CHECK = 2;
10 STOP = 3;
11}

◆ DataType

枚举值
MAP_MAKING 
MAP_CHECKOUT 

在文件 collection_check_message.proto13 行定义.

◆ ErrorCode

枚举值
SUCCESS 
ERROR 
ERROR_REQUEST 
ERROR_SERVICE_NO_RESPONSE 
ERROR_REPEATED_START 
ERROR_CHECK_BEFORE_START 
ERROR_GPSBIN_LACK 
ERROR_DISKINFO_ERROR 
ERROR_DISK_UNMOUNT 
ERROR_SPEED_LACK 
WARNING_ODOMETER_LACK 
ERROR_RTKSTATUS_EMPTY 
ERROR_MAPGRPC_NOT_CONNECT 
WARNING_NOT_STRAIGHT 
WARNING_PROGRESS_ROLLBACK 
ERROR_NOT_EIGHT_ROUTE 
ERROR_CHANNEL_VERIFY_TOPIC_LACK 
ERROR_CHANNEL_VERIFY_RATES_ABNORMAL 
ERROR_VERIFY_NO_RECORDERS 
ERROR_LOOPS_NOT_REACHED 
ERROR_VERIFY_NO_GNSSPOS 
ERROR_NOT_STATIC 
ERROR_GNSS_SIGNAL_FAIL 
SUCCESS_TASK_EMPTY 
SUCCESS_TASK_STOCK 

在文件 collection_error_code.proto4 行定义.

4 {
5 // common: x
6 SUCCESS = 0;
7 ERROR = 1;
8 ERROR_REQUEST = 2; // invalid request parameter
9 ERROR_SERVICE_NO_RESPONSE = 3; // cybertron services no response
12
13 // APP fetch: 10x
14 ERROR_GPSBIN_LACK = 101; // gpsbin in car is lack or not complete.
17
18 ERROR_SPEED_LACK = 105;
21
22 // map-datachecker: 20x
24
25 // map-datachecher: dynamic_align: 21x
27 212; // heading too large, need warning straight driving.
28 WARNING_PROGRESS_ROLLBACK = 213; // progress rollback because turn a corner.
29
30 // map-datachecher: eight_route: 22x
31 ERROR_NOT_EIGHT_ROUTE = 221; // heading is not an eight route.
32
33 // map-datachecher: data_verify: 23x
34 ERROR_CHANNEL_VERIFY_TOPIC_LACK = 231; // some topic lack in channel_verify.
35 ERROR_CHANNEL_VERIFY_RATES_ABNORMAL = 232; // some topic rates abnormal
37 233; // data verify has/find no recorders in disks.
38 ERROR_LOOPS_NOT_REACHED = 234; // loops is not enough 5/6
39 ERROR_VERIFY_NO_GNSSPOS = 235; // cybertron has no gnsspos callback.
40
41 // map-datachecker: static_align: 24x
42 ERROR_NOT_STATIC = 241; // car is not static.
43 ERROR_GNSS_SIGNAL_FAIL = 242; // gnss signal is broken | fail
44
45 // task handler: 30x

◆ LoopsVerifyAgentState

枚举值
IDLE 
RUNNING 

在文件 loops_verify_agent.h31 行定义.

31{ IDLE, RUNNING };

◆ PolygonType

enum class apollo::hdmap::PolygonType
strong
枚举值
JUNCTION_POLYGON 
PARKINGSPACE_POLYGON 
ROAD_HOLE_POLYGON 

在文件 hdmap_common.h103 行定义.

◆ PoseCollectionState

枚举值
IDLE 
RUNNING 

在文件 pose_collection.h25 行定义.

25{ IDLE, RUNNING };

◆ State

enum class apollo::hdmap::State
strong
枚举值
IDLE 
RUNNING 

在文件 common.h56 行定义.

56{ IDLE, RUNNING };

◆ StaticAlignDetectMethod

枚举值
RANSAC 
DYNAMIC_CENTROID 

在文件 static_align.h27 行定义.

函数说明

◆ BaseMapFile()

std::string apollo::hdmap::BaseMapFile ( )

get base map file path from flags.

返回
base map path

在文件 hdmap_util.cc47 行定义.

47 {
48 if (FLAGS_use_navigation_mode) {
49 AWARN << "base_map file is not used when FLAGS_use_navigation_mode is true";
50 }
51 return FLAGS_test_base_map_filename.empty()
52 ? FindFirstExist(FLAGS_map_dir, FLAGS_base_map_filename)
53 : FindFirstExist(FLAGS_map_dir, FLAGS_test_base_map_filename);
54}
#define AWARN
Definition log.h:43

◆ CreateMap() [1/2]

std::unique_ptr< HDMap > apollo::hdmap::CreateMap ( const MapMsg map_msg)

在文件 hdmap_util.cc81 行定义.

81 {
82 std::unique_ptr<HDMap> hdmap(new HDMap());
83 if (hdmap->LoadMapFromProto(map_msg.hdmap()) != 0) {
84 AERROR << "Failed to load RelativeMap: "
85 << map_msg.header().ShortDebugString();
86 return nullptr;
87 }
88 return hdmap;
89}
High-precision map loader interface.
Definition hdmap.h:54
#define AERROR
Definition log.h:44
optional apollo::common::Header header
optional apollo::hdmap::Map hdmap

◆ CreateMap() [2/2]

std::unique_ptr< HDMap > apollo::hdmap::CreateMap ( const std::string &  map_file_path)

在文件 hdmap_util.cc71 行定义.

71 {
72 std::unique_ptr<HDMap> hdmap(new HDMap());
73 if (hdmap->LoadMapFromFile(map_file_path) != 0) {
74 AERROR << "Failed to load HDMap " << map_file_path;
75 return nullptr;
76 }
77 AINFO << "Load HDMap success: " << map_file_path;
78 return hdmap;
79}
#define AINFO
Definition log.h:42

◆ DECLARE_string() [1/8]

apollo::hdmap::DECLARE_string ( client_conf_yaml  )

◆ DECLARE_string() [2/8]

apollo::hdmap::DECLARE_string ( cmd  )

◆ DECLARE_string() [3/8]

apollo::hdmap::DECLARE_string ( conf_json  )

◆ DECLARE_string() [4/8]

apollo::hdmap::DECLARE_string ( map_datachecker_host  )

◆ DECLARE_string() [5/8]

apollo::hdmap::DECLARE_string ( map_datachecker_port  )

◆ DECLARE_string() [6/8]

apollo::hdmap::DECLARE_string ( record_path  )

◆ DECLARE_string() [7/8]

apollo::hdmap::DECLARE_string ( stage  )

◆ DECLARE_string() [8/8]

apollo::hdmap::DECLARE_string ( topic_bestgnsspos  )

◆ DefaultRoutingFile()

std::string apollo::hdmap::DefaultRoutingFile ( )
inline

get default routing file path from flags.

返回
default routing points file path

在文件 hdmap_util.h68 行定义.

68 {
69 return absl::StrCat(FLAGS_map_dir, "_", FLAGS_default_routing_filename);
70}

◆ DEFINE_string() [1/8]

apollo::hdmap::DEFINE_string ( client_conf_yaml  ,
"modules/map/tools/map_datachecker/client/conf/client.yaml"  ,
"client configurations"   
)

◆ DEFINE_string() [2/8]

apollo::hdmap::DEFINE_string ( cmd  ,
"start"  ,
"command corresponding to stage"   
)

◆ DEFINE_string() [3/8]

apollo::hdmap::DEFINE_string ( conf_json  ,
"modules/map/tools/map_datachecker/server/conf/" "map-datachecker.json"  ,
"configure file"   
)

◆ DEFINE_string() [4/8]

apollo::hdmap::DEFINE_string ( map_datachecker_host  ,
"127.0.0.1"  ,
"the grpc server host"   
)

◆ DEFINE_string() [5/8]

apollo::hdmap::DEFINE_string ( map_datachecker_port  ,
"50100"  ,
"the grpc server port"   
)

◆ DEFINE_string() [6/8]

apollo::hdmap::DEFINE_string ( record_path  ,
""  ,
"record path"   
)

◆ DEFINE_string() [7/8]

apollo::hdmap::DEFINE_string ( stage  ,
""  ,
"data acquisition stage"   
)

◆ DEFINE_string() [8/8]

apollo::hdmap::DEFINE_string ( topic_bestgnsspos  ,
"/apollo/sensor/gnss/best_pose"  ,
""   
)

◆ EndWayPointFile()

std::string apollo::hdmap::EndWayPointFile ( )
inline

get end way point file path from flags.

返回
end way point file path

在文件 hdmap_util.h56 行定义.

56 {
57 if (FLAGS_use_navigation_mode) {
58 return absl::StrCat(FLAGS_navigation_mode_end_way_point_file);
59 } else {
60 return absl::StrCat(FLAGS_map_dir, "/", FLAGS_end_way_point_filename);
61 }
62}

◆ GetFileLines()

std::vector< std::string > apollo::hdmap::GetFileLines ( const std::string &  path)

在文件 client_common.cc29 行定义.

29 {
30 std::ifstream file_handler(path);
31 std::string line;
32 std::vector<std::string> lines;
33 while (std::getline(file_handler, line)) {
34 lines.emplace_back(line);
35 }
36 file_handler.close();
37 return lines;
38}

◆ GetYaw()

double apollo::hdmap::GetYaw ( double  from_x,
double  from_y,
double  to_x,
double  to_y 
)
inline

在文件 common.h111 行定义.

111 {
112 double vecx = to_x - from_x;
113 double vecy = to_y - from_y;
114 double alpha = acos(vecy / sqrt(vecx * vecx + vecy * vecy));
115 if (vecx < 0) {
116 alpha = 2 * M_PI - alpha;
117 }
118 return kRADIANS_TO_DEGREES * alpha;
119}
constexpr double kRADIANS_TO_DEGREES

◆ LeftBoundaryType()

LaneBoundaryType::Type apollo::hdmap::LeftBoundaryType ( const LaneWaypoint waypoint)

get left boundary type at a waypoint.

在文件 path.cc75 行定义.

75 {
76 if (!waypoint.lane) {
77 return LaneBoundaryType::UNKNOWN;
78 }
79 for (const auto& type :
80 waypoint.lane->lane().left_boundary().boundary_type()) {
81 if (type.s() <= waypoint.s) {
82 if (type.types_size() > 0) {
83 return type.types(0);
84 } else {
85 return LaneBoundaryType::UNKNOWN;
86 }
87 }
88 }
89 return LaneBoundaryType::UNKNOWN;
90}
LaneInfoConstPtr lane
Definition path.h:44

◆ LeftNeighborWaypoint()

LaneWaypoint apollo::hdmap::LeftNeighborWaypoint ( const LaneWaypoint waypoint)

get left neighbor lane waypoint.

If not exist, the Waypoint.lane will be null.

在文件 path.cc109 行定义.

109 {
110 LaneWaypoint neighbor;
111 if (!waypoint.lane) {
112 return neighbor;
113 }
114 auto point = waypoint.lane->GetSmoothPoint(waypoint.s);
115 auto map_ptr = HDMapUtil::BaseMapPtr();
116 CHECK_NOTNULL(map_ptr);
117 for (const auto& lane_id :
118 waypoint.lane->lane().left_neighbor_forward_lane_id()) {
119 auto lane = map_ptr->GetLaneById(lane_id);
120 if (!lane) {
121 return neighbor;
122 }
123 double s = 0.0;
124 double l = 0.0;
125 if (!lane->GetProjection({point.x(), point.y()}, &s, &l)) {
126 continue;
127 }
128
129 if (s < -kSampleDistance || s > lane->total_length() + kSampleDistance) {
130 continue;
131 } else {
132 return LaneWaypoint(lane, s);
133 }
134 }
135 return neighbor;
136}

◆ MakeMapId()

apollo::hdmap::Id apollo::hdmap::MakeMapId ( const std::string &  id)
inline

create a Map ID given a string.

参数
ida string id
返回
a Map ID instance

在文件 hdmap_util.h85 行定义.

85 {
86 apollo::hdmap::Id map_id;
87 map_id.set_id(id);
88 return map_id;
89}

◆ operator<<()

std::ostream & apollo::hdmap::operator<< ( std::ostream &  os,
const ::google::protobuf::RepeatedPtrField< apollo::hdmap::Id > &  ids 
)

在文件 map_xysl.cc58 行定义.

60 {
61 for (int i = 0; i < ids.size(); ++i) {
62 os << ids.Get(i).id();
63 if (i != ids.size() - 1) {
64 os << ", ";
65 }
66 }
67 return os;
68}

◆ ParkGoRoutingFile()

std::string apollo::hdmap::ParkGoRoutingFile ( )
inline

get park and go routings file path from flags.

返回
park and routng routings file path

在文件 hdmap_util.h76 行定义.

76 {
77 return absl::StrCat(FLAGS_map_dir, "_", FLAGS_park_go_routing_filename);
78}

◆ ParseJson()

std::shared_ptr< JsonConf > apollo::hdmap::ParseJson ( std::string  conf_path)

在文件 common.cc23 行定义.

23 {
24 AINFO << "parsing json config";
25 boost::filesystem::path path(conf_path);
26 if (!boost::filesystem::exists(path)) {
27 AERROR << "json config file " << conf_path << " does not exist";
28 return nullptr;
29 }
30
31 std::shared_ptr<JsonConf> conf(new JsonConf);
32 boost::property_tree::ptree pt;
33 try {
34 boost::property_tree::read_json(conf_path, pt);
35 conf->use_system_time = pt.get<bool>("use_system_time");
36 conf->topic_rate_tolerance = pt.get<double>("topic_rate_tolerance");
37 boost::property_tree::ptree children2 = pt.get_child("topic_list");
38 for (auto it = children2.begin(); it != children2.end(); ++it) {
39 conf->topic_list.push_back(
40 std::make_pair(it->first, it->second.get_value<double>()));
41 }
42
43 conf->solution_status = pt.get<unsigned int>("solution_status");
44
45 boost::property_tree::ptree position_type = pt.get_child("position_type");
46 for (auto it = position_type.begin(); it != position_type.end(); ++it) {
47 conf->position_type_range.insert(it->second.get_value<unsigned int>());
48 }
49
50 conf->local_std_upper_limit = pt.get<double>("local_std_upper_limit");
51
52 boost::property_tree::ptree diff_age = pt.get_child("diff_age");
53 {
54 auto it = diff_age.begin();
55 conf->diff_age_range.first = it->second.get_value<float>();
56 ++it;
57 conf->diff_age_range.second = it->second.get_value<float>();
58 }
59
60 conf->channel_check_trigger_gap = pt.get<int>("channel_check_trigger_gap");
61 conf->alignment_featch_pose_sleep =
62 pt.get<int>("alignment_featch_pose_sleep");
63 conf->static_align_duration = pt.get<double>("static_align_duration");
64 conf->static_align_tolerance = pt.get<double>("static_align_tolerance");
65 conf->static_align_dist_thresh = pt.get<double>("static_align_dist_thresh");
66
67 conf->eight_angle = pt.get<double>("eight_angle");
68 conf->eight_duration = pt.get<double>("eight_duration");
69 conf->eight_vel = pt.get<double>("eight_vel");
70 conf->eight_bad_pose_tolerance = pt.get<int>("eight_bad_pose_tolerance");
71
72 conf->laps_frames_thresh = pt.get<int>("laps_frames_thresh");
73 conf->laps_alpha_err_thresh = pt.get<double>("laps_alpha_err_thresh");
74 conf->laps_time_err_thresh = pt.get<double>("laps_time_err_thresh");
75 conf->laps_search_diameter = pt.get<int>("laps_search_diameter");
76 conf->laps_number = pt.get<int>("laps_number");
77 conf->laps_number_additional = pt.get<int>("laps_number_additional");
78 conf->laps_rate_thresh = pt.get<double>("laps_rate_thresh");
79 } catch (const boost::property_tree::json_parser_error& e) {
80 AERROR << e.what();
81 return nullptr;
82 } catch (const std::exception& e) {
83 AERROR << e.what();
84 return nullptr;
85 }
86 return conf;
87}

◆ RefreshDefaultEndPoint()

void apollo::hdmap::RefreshDefaultEndPoint ( )

在文件 refresh_default_end_way_point.cc62 行定义.

62 {
64 ACHECK(cyber::common::GetProtoFromASCIIFile(EndWayPointFile(), &old_poi));
65
67 for (const auto& old_landmark : old_poi.landmark()) {
68 apollo::routing::Landmark* new_landmark = new_poi.add_landmark();
69 new_landmark->set_name(old_landmark.name());
70 AINFO << "Refreshed point of interest: " << old_landmark.name();
71 // Read xyz from old point.
72 for (const auto& old_end_point : old_landmark.waypoint()) {
74 old_xyz.set_x(old_end_point.pose().x());
75 old_xyz.set_y(old_end_point.pose().y());
76 old_xyz.set_z(old_end_point.pose().z());
77
78 // Get new lane info from xyz.
79 std::string new_lane;
80 double new_s;
81 double new_l;
82 XYZToSL(old_xyz, &new_lane, &new_s, &new_l);
83
84 // Get new xyz from lane info.
85 const auto new_xyz = SLToXYZ(new_lane, new_s, new_l);
86
87 // Update default end way point.
89 new_end_point.set_id(new_lane);
90 new_end_point.set_s(new_s);
91 auto* pose = new_end_point.mutable_pose();
92 pose->set_x(new_xyz.x());
93 pose->set_y(new_xyz.y());
94 pose->set_z(new_xyz.z());
95 *new_landmark->add_waypoint() = new_end_point;
96
97 AINFO << "\n ============ from ============ \n"
98 << old_end_point.DebugString()
99 << "\n ============ to ============ \n"
100 << new_end_point.DebugString() << "XYZ distance is "
101 << XYZDistance(old_xyz, new_xyz);
102 }
103 }
104 ACHECK(cyber::common::SetProtoToASCIIFile(new_poi, EndWayPointFile()));
105}
#define ACHECK(cond)
Definition log.h:80
std::string EndWayPointFile()
get end way point file path from flags.
Definition hdmap_util.h:56
void XYZToSL(const apollo::common::PointENU &point, std::string *lane_id, double *s, double *l)
double XYZDistance(const apollo::common::PointENU &p1, const apollo::common::PointENU &p2)
apollo::common::PointENU SLToXYZ(const std::string &lane_id, const double s, const double l)
optional string name
Definition poi.proto:23

◆ RightBoundaryType()

LaneBoundaryType::Type apollo::hdmap::RightBoundaryType ( const LaneWaypoint waypoint)

get left boundary type at a waypoint.

在文件 path.cc92 行定义.

92 {
93 if (!waypoint.lane) {
94 return LaneBoundaryType::UNKNOWN;
95 }
96 for (const auto& type :
97 waypoint.lane->lane().right_boundary().boundary_type()) {
98 if (type.s() <= waypoint.s) {
99 if (type.types_size() > 0) {
100 return type.types(0);
101 } else {
102 return LaneBoundaryType::UNKNOWN;
103 }
104 }
105 }
106 return LaneBoundaryType::UNKNOWN;
107}

◆ RightNeighborWaypoint()

LaneWaypoint apollo::hdmap::RightNeighborWaypoint ( const LaneWaypoint waypoint)

get left neighbor lane waypoint.

If not exist, the Waypoint.lane will be null.

在文件 path.cc165 行定义.

165 {
166 LaneWaypoint neighbor;
167 if (!waypoint.lane) {
168 return neighbor;
169 }
170 auto point = waypoint.lane->GetSmoothPoint(waypoint.s);
171 auto map_ptr = HDMapUtil::BaseMapPtr();
172 CHECK_NOTNULL(map_ptr);
173 for (const auto& lane_id :
174 waypoint.lane->lane().right_neighbor_forward_lane_id()) {
175 auto lane = map_ptr->GetLaneById(lane_id);
176 if (!lane) {
177 return neighbor;
178 }
179 double s = 0.0;
180 double l = 0.0;
181 if (!lane->GetProjection({point.x(), point.y()}, &s, &l)) {
182 continue;
183 }
184 if (s < -kSampleDistance || s > lane->total_length() + kSampleDistance) {
185 continue;
186 } else {
187 return LaneWaypoint(lane, s);
188 }
189 }
190 return neighbor;
191}

◆ RoutingMapFile()

std::string apollo::hdmap::RoutingMapFile ( )

get routing map file path from flags.

返回
routing map path

在文件 hdmap_util.cc63 行定义.

63 {
64 if (FLAGS_use_navigation_mode) {
65 AWARN << "routing_map file is not used when FLAGS_use_navigation_mode is "
66 "true";
67 }
68 return FindFirstExist(FLAGS_map_dir, FLAGS_routing_map_filename);
69}

◆ SimMapFile()

std::string apollo::hdmap::SimMapFile ( )

get simulation map file path from flags.

返回
simulation map path

在文件 hdmap_util.cc56 行定义.

56 {
57 if (FLAGS_use_navigation_mode) {
58 AWARN << "sim_map file is not used when FLAGS_use_navigation_mode is true";
59 }
60 return FindFirstExist(FLAGS_map_dir, FLAGS_sim_map_filename);
61}

◆ SLToXYZ()

apollo::common::PointENU apollo::hdmap::SLToXYZ ( const std::string &  lane_id,
const double  s,
const double  l 
)

在文件 refresh_default_end_way_point.cc36 行定义.

37 {
38 const auto lane_info = HDMapUtil::BaseMap().GetLaneById(MakeMapId(lane_id));
39 ACHECK(lane_info);
40 return lane_info->GetSmoothPoint(s);
41}
apollo::hdmap::Id MakeMapId(const std::string &id)
create a Map ID given a string.
Definition hdmap_util.h:85

◆ UnixNow()

double apollo::hdmap::UnixNow ( )
inline

在文件 client_common.h37 行定义.

static Time Now()
get the current time.
Definition time.cc:57
double ToSecond() const
convert time to second.
Definition time.cc:77

◆ XYZDistance()

double apollo::hdmap::XYZDistance ( const apollo::common::PointENU p1,
const apollo::common::PointENU p2 
)

在文件 refresh_default_end_way_point.cc54 行定义.

55 {
56 const double x_diff = p1.x() - p2.x();
57 const double y_diff = p1.y() - p2.y();
58 const double z_diff = p1.z() - p2.z();
59 return std::sqrt(x_diff * x_diff + y_diff * y_diff + z_diff * z_diff);
60}

◆ XYZToSL()

void apollo::hdmap::XYZToSL ( const apollo::common::PointENU point,
std::string *  lane_id,
double *  s,
double *  l 
)

在文件 refresh_default_end_way_point.cc43 行定义.

44 {
45 ACHECK(lane_id);
46 ACHECK(s);
47 ACHECK(l);
48 LaneInfoConstPtr lane = nullptr;
49
50 CHECK_EQ(HDMapUtil::BaseMap().GetNearestLane(point, &lane, s, l), 0);
51 *lane_id = lane->id().id();
52}
std::shared_ptr< const LaneInfo > LaneInfoConstPtr

变量说明

◆ kDEGRESS_TO_RADIANS

constexpr double apollo::hdmap::kDEGRESS_TO_RADIANS = M_PI / 180.0
constexpr

在文件 common.h38 行定义.

◆ kRADIANS_TO_DEGREES

constexpr double apollo::hdmap::kRADIANS_TO_DEGREES = 180.0 / M_PI
constexpr

在文件 common.h37 行定义.