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

#include <ground_service.h>

类 apollo::perception::lidar::GroundService 继承关系图:
apollo::perception::lidar::GroundService 的协作图:

Public 成员函数

 GroundService ()=default
 
 ~GroundService ()
 
bool Init (const SceneServiceInitOptions &options=SceneServiceInitOptions()) override
 
std::string Name () const override
 
GroundServiceContent * GetGroundServiceContent () const
 
float QueryPointToGroundDistance (const Eigen::Vector3d &world_point)
 
float QueryPointToGroundDistance (const Eigen::Vector3d &world_point, const GroundServiceContent &content)
 
- Public 成员函数 继承自 apollo::perception::lidar::SceneService
 SceneService ()=default
 
virtual ~SceneService ()=default
 
void GetServiceContentCopy (SceneServiceContent *content)
 
void UpdateServiceContent (const SceneServiceContent &content)
 

Protected 属性

GroundServiceContent * ground_content_ref_ = nullptr
 
- Protected 属性 继承自 apollo::perception::lidar::SceneService
SceneServiceContentPtr self_content_
 
std::mutex mutex_
 

详细描述

在文件 ground_service.h 第 73 行定义.

构造及析构函数说明

◆ GroundService()

apollo::perception::lidar::GroundService::GroundService ( )
default

◆ ~GroundService()

apollo::perception::lidar::GroundService::~GroundService ( )
inline

在文件 ground_service.h 第 76 行定义.

76{ ground_content_ref_ = nullptr; }

成员函数说明

◆ GetGroundServiceContent()

GroundServiceContent * apollo::perception::lidar::GroundService::GetGroundServiceContent ( ) const
inline

在文件 ground_service.h 第 85 行定义.

85 {
87 }

◆ Init()

bool apollo::perception::lidar::GroundService::Init ( const SceneServiceInitOptions &  options = SceneServiceInitOptions())
overridevirtual

实现了 apollo::perception::lidar::SceneService.

在文件 ground_service.cc 第 133 行定义.

133 {
134 self_content_.reset(new GroundServiceContent);
136 dynamic_cast<GroundServiceContent*>(self_content_.get());
137 // initialize ground service content from config manager and proto
138 // including resolution, grid size, ...
139 std::string config_file = FLAGS_ground_service_file;
140 if (!options.config_file.empty()) {
141 config_file = options.config_file;
142 }
143
144 config_file = GetCommonConfigFile(config_file);
145
146 GroundServiceConfig config_params;
147 ACHECK(cyber::common::GetProtoFromFile(config_file, &config_params))
148 << "Failed to parse GroundServiceConfig config file.";
149
150 double roi_region_rad_x = config_params.roi_rad_x();
151 double roi_region_rad_y = config_params.roi_rad_y();
152 uint32_t rows = config_params.grid_size();
153 uint32_t cols = config_params.grid_size();
154
155 ground_content_ref_->Init(roi_region_rad_x, roi_region_rad_y, rows, cols);
156
157 return true;
158}
bool Init(double roi_x, double roi_y, uint32_t rows, uint32_t cols)
#define ACHECK(cond)
Definition log.h:80
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 GetCommonConfigFile(const std::string &config_file)
Get the perception common config path
Definition util.cc:28

◆ Name()

std::string apollo::perception::lidar::GroundService::Name ( ) const
inlineoverridevirtual

实现了 apollo::perception::lidar::SceneService.

在文件 ground_service.h 第 83 行定义.

83{ return "GroundService"; }

◆ QueryPointToGroundDistance() [1/2]

float apollo::perception::lidar::GroundService::QueryPointToGroundDistance ( const Eigen::Vector3d &  world_point)

在文件 ground_service.cc 第 160 行定义.

161 {
162 std::lock_guard<std::mutex> lock(mutex_);
163 float distance =
165 return distance;
166}
float QueryPointToGroundDistance(const Eigen::Vector3d &world_point)

◆ QueryPointToGroundDistance() [2/2]

float apollo::perception::lidar::GroundService::QueryPointToGroundDistance ( const Eigen::Vector3d &  world_point,
const GroundServiceContent &  content 
)

在文件 ground_service.cc 第 168 行定义.

169 {
170 return content.PointToPlaneDistance(world_point);
171}

类成员变量说明

◆ ground_content_ref_

GroundServiceContent* apollo::perception::lidar::GroundService::ground_content_ref_ = nullptr
protected

在文件 ground_service.h 第 102 行定义.


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