Apollo 11.0
自动驾驶开放平台
apollo::perception::lidar::MapManager类 参考

#include <map_manager.h>

apollo::perception::lidar::MapManager 的协作图:

Public 成员函数

 MapManager ()=default
 Construct a new Map Manager object
 
 ~MapManager ()=default
 Destroy the Map Manager object
 
bool Init (const MapManagerInitOptions &options=MapManagerInitOptions())
 Init of Map Manager
 
bool Update (const MapManagerOptions &options, LidarFrame *frame)
 update map structure and lidar2world pose
 
bool QueryPose (Eigen::Affine3d *sensor2world_pose) const
 Query the pose
 
std::string Name () const
 Name of Map Manager
 

详细描述

在文件 map_manager.h41 行定义.

构造及析构函数说明

◆ MapManager()

apollo::perception::lidar::MapManager::MapManager ( )
default

Construct a new Map Manager object

◆ ~MapManager()

apollo::perception::lidar::MapManager::~MapManager ( )
default

Destroy the Map Manager object

成员函数说明

◆ Init()

bool apollo::perception::lidar::MapManager::Init ( const MapManagerInitOptions options = MapManagerInitOptions())

Init of Map Manager

参数
optionsmap manager init options
返回
true
false

在文件 map_manager.cc27 行定义.

27 {
28 std::string config_file =
29 GetConfigFile(options.config_path, options.config_file);
30 MapManagerConfig config;
31 ACHECK(cyber::common::GetProtoFromFile(config_file, &config));
32 update_pose_ = config.update_pose();
33 roi_search_distance_ = config.roi_search_distance();
34 hdmap_input_ = map::HDMapInput::Instance();
35 if (!hdmap_input_->Init()) {
36 AINFO << "Failed to init hdmap input.";
37 return false;
38 }
39 return true;
40}
#define ACHECK(cond)
Definition log.h:80
#define AINFO
Definition log.h:42
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...
Definition file.cc:132
std::string GetConfigFile(const std::string &config_path, const std::string &config_file)
Definition util.cc:80

◆ Name()

std::string apollo::perception::lidar::MapManager::Name ( ) const
inline

Name of Map Manager

返回
std::string

在文件 map_manager.h88 行定义.

88{ return "MapManager"; }

◆ QueryPose()

bool apollo::perception::lidar::MapManager::QueryPose ( Eigen::Affine3d *  sensor2world_pose) const

Query the pose

参数
sensor2world_posesensor to world pose
返回
true
false

在文件 map_manager.cc74 行定义.

74 {
75 // TODO(...): map-based alignment to refine pose
76 return false;
77}

◆ Update()

bool apollo::perception::lidar::MapManager::Update ( const MapManagerOptions options,
LidarFrame frame 
)

update map structure and lidar2world pose

参数
optionsmap manager options
framelidar frame
返回
true
false

在文件 map_manager.cc42 行定义.

42 {
43 if (!frame) {
44 AINFO << "Frame is nullptr.";
45 return false;
46 }
47 if (!(frame->hdmap_struct)) {
48 frame->hdmap_struct.reset(new base::HdmapStruct);
49 }
50 if (!hdmap_input_) {
51 AINFO << "Hdmap input is nullptr";
52 return false;
53 }
54 if (update_pose_) {
55 if (!QueryPose(&(frame->lidar2world_pose))) {
56 AINFO << "Failed to query updated pose.";
57 }
58 }
59 base::PointD point;
60 point.x = frame->lidar2world_pose.translation()(0);
61 point.y = frame->lidar2world_pose.translation()(1);
62 point.z = frame->lidar2world_pose.translation()(2);
63 if (!hdmap_input_->GetRoiHDMapStruct(point, roi_search_distance_,
64 frame->hdmap_struct)) {
65 frame->hdmap_struct->road_polygons.clear();
66 frame->hdmap_struct->road_boundary.clear();
67 frame->hdmap_struct->hole_polygons.clear();
68 frame->hdmap_struct->junction_polygons.clear();
69 AINFO << "Failed to get roi from hdmap.";
70 }
71 return true;
72}
bool QueryPose(Eigen::Affine3d *sensor2world_pose) const
Query the pose
bool GetRoiHDMapStruct(const base::PointD &pointd, const double distance, std::shared_ptr< base::HdmapStruct > hdmap_struct_prt)
Point< double > PointD
Definition point.h:57

该类的文档由以下文件生成: