Apollo 10.0
自动驾驶开放平台
|
The data structure of the base map. 更多...
#include <base_map.h>
Public 成员函数 | |
BaseMap (BaseMapConfig *config) | |
The constructor. | |
virtual | ~BaseMap () |
The destructor. | |
virtual void | InitMapNodeCaches (int cacheL1_size, int cahceL2_size) |
void | AttachMapNodePool (BaseMapNodePool *p_map_node_pool) |
Attach map node pointer. | |
BaseMapNode * | GetMapNode (const MapNodeIndex &index) |
Return the map node, if it's not in the cache, return false. | |
BaseMapNode * | GetMapNodeSafe (const MapNodeIndex &index) |
Return the map node, if it's not in the cache, safely load it. | |
bool | IsMapNodeExist (const MapNodeIndex &index) |
Check if the map node in the cache. | |
bool | SetMapFolderPath (const std::string folder_path) |
Set the directory of the map. | |
void | AddDataset (const std::string dataset_path) |
Add a dataset path to the map config. | |
void | Release () |
Release resources. | |
virtual void | PreloadMapArea (const Eigen::Vector3d &location, const Eigen::Vector3d &trans_diff, unsigned int resolution_id, unsigned int zone_id) |
Preload map nodes for the next frame location calculation. | |
virtual bool | LoadMapArea (const Eigen::Vector3d &seed_pt3d, unsigned int resolution_id, unsigned int zone_id, int filter_size_x, int filter_size_y) |
Load map nodes for the location calculate of this frame. | |
void | ComputeMd5ForAllMapNodes () |
Compute md5 for all map node file in map. | |
bool | CheckMap () |
Check if map is normal. | |
bool | CheckMapStrictly () |
Check if map is normal(with map node checking). | |
const BaseMapConfig & | GetMapConfig () const |
Get the map config. | |
BaseMapConfig & | GetMapConfig () |
Get the map config. | |
const std::vector< std::string > & | GetAllMapNodePaths () const |
Get all map node paths. | |
const std::vector< std::string > & | GetAllMapNodeMd5s () const |
Get all map node md5s. | |
Protected 成员函数 | |
void | GetAllMapIndexAndPath () |
MapNodeIndex | GetMapIndexFromMapPath (const std::string &map_path) |
void | LoadMapNodes (std::set< MapNodeIndex > *map_ids) |
Load map node by index. | |
void | PreloadMapNodes (std::set< MapNodeIndex > *map_ids) |
Load map node by index. | |
void | LoadMapNodeThreadSafety (const MapNodeIndex &index, bool is_reserved=false) |
Load map node by index, thread_safety. | |
void | CheckAndUpdateCache (std::set< MapNodeIndex > *map_ids) |
Check map node in L2 Cache. | |
Protected 属性 | |
BaseMapConfig * | map_config_ = nullptr |
The map settings. | |
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc | destroy_func_lvl1_ |
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc | destroy_func_lvl2_ |
std::unique_ptr< MapNodeCache< MapNodeIndex, BaseMapNode > > | map_node_cache_lvl1_ = nullptr |
The cache for map node preload. | |
std::unique_ptr< MapNodeCache< MapNodeIndex, BaseMapNode > > | map_node_cache_lvl2_ = nullptr |
brief The dynamic map node preloading thread pool pointer. | |
BaseMapNodePool * | map_node_pool_ = nullptr |
The map node memory pool pointer. | |
std::set< MapNodeIndex > | map_preloading_task_index_ |
@bried Keep the index of preloading nodes. | |
boost::recursive_mutex | map_load_mutex_ |
The mutex for preload map node. | |
std::vector< MapNodeIndex > | all_map_node_indices_ |
All the map nodes in the Map (in the disk). | |
std::vector< std::string > | all_map_node_paths_ |
std::vector< std::string > | all_map_node_md5s_ |
All the map nodes' md5 in the Map (in the disk). | |
The data structure of the base map.
在文件 base_map.h 第 38 行定义.
|
explicit |
The constructor.
在文件 base_map.cc 第 32 行定义.
|
virtual |
void apollo::localization::msf::pyramid_map::BaseMap::AddDataset | ( | const std::string | dataset_path | ) |
Add a dataset path to the map config.
在文件 base_map.cc 第 117 行定义.
void apollo::localization::msf::pyramid_map::BaseMap::AttachMapNodePool | ( | BaseMapNodePool * | p_map_node_pool | ) |
|
protected |
Check map node in L2 Cache.
在文件 base_map.cc 第 164 行定义.
bool apollo::localization::msf::pyramid_map::BaseMap::CheckMap | ( | ) |
Check if map is normal.
在文件 base_map.cc 第 533 行定义.
bool apollo::localization::msf::pyramid_map::BaseMap::CheckMapStrictly | ( | ) |
Check if map is normal(with map node checking).
在文件 base_map.cc 第 552 行定义.
void apollo::localization::msf::pyramid_map::BaseMap::ComputeMd5ForAllMapNodes | ( | ) |
Compute md5 for all map node file in map.
在文件 base_map.cc 第 522 行定义.
|
protected |
在文件 base_map.cc 第 502 行定义.
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
在文件 base_map.cc 第 490 行定义.
BaseMapNode * apollo::localization::msf::pyramid_map::BaseMap::GetMapNode | ( | const MapNodeIndex & | index | ) |
Return the map node, if it's not in the cache, return false.
在文件 base_map.cc 第 57 行定义.
BaseMapNode * apollo::localization::msf::pyramid_map::BaseMap::GetMapNodeSafe | ( | const MapNodeIndex & | index | ) |
Return the map node, if it's not in the cache, safely load it.
在文件 base_map.cc 第 63 行定义.
|
virtual |
在文件 base_map.cc 第 40 行定义.
bool apollo::localization::msf::pyramid_map::BaseMap::IsMapNodeExist | ( | const MapNodeIndex & | index | ) |
Check if the map node in the cache.
在文件 base_map.cc 第 99 行定义.
|
virtual |
Load map nodes for the location calculate of this frame.
If the forecasts are correct in last frame, these nodes will be all in cache, if not, then need to create loading tasks, and wait for the loading finish, in order to the nodes which the following calculate needed are all in the memory, eigen version.
top left
top center
top right
middle left
middle center
middle right
bottom left
bottom center
bottom right
在文件 base_map.cc 第 394 行定义.
|
protected |
Load map node by index.
在文件 base_map.cc 第 123 行定义.
|
protected |
Load map node by index, thread_safety.
在文件 base_map.cc 第 228 行定义.
|
virtual |
Preload map nodes for the next frame location calculation.
It will forecasts the nodes by the direction of the car moving. Because the progress of loading will cost a long time (over 100ms), it must do this for a period of time in advance. After the index of nodes calculate finished, it will create loading tasks, but will not wait for the loading finished, eigen version.
top left
top center
top right
middle left
middle center
middle right
bottom left
bottom center
bottom right
在文件 base_map.cc 第 263 行定义.
|
protected |
Load map node by index.
在文件 base_map.cc 第 181 行定义.
void apollo::localization::msf::pyramid_map::BaseMap::Release | ( | ) |
Release resources.
bool apollo::localization::msf::pyramid_map::BaseMap::SetMapFolderPath | ( | const std::string | folder_path | ) |
Set the directory of the map.
在文件 base_map.cc 第 106 行定义.
|
protected |
All the map nodes in the Map (in the disk).
在文件 base_map.h 第 143 行定义.
|
protected |
All the map nodes' md5 in the Map (in the disk).
在文件 base_map.h 第 147 行定义.
|
protected |
在文件 base_map.h 第 144 行定义.
|
protected |
在文件 base_map.h 第 127 行定义.
|
protected |
在文件 base_map.h 第 128 行定义.
|
protected |
The map settings.
在文件 base_map.h 第 125 行定义.
|
protected |
The mutex for preload map node.
在文件 base_map.h 第 140 行定义.
|
protected |
The cache for map node preload.
在文件 base_map.h 第 131 行定义.
|
protected |
brief The dynamic map node preloading thread pool pointer.
在文件 base_map.h 第 134 行定义.
|
protected |
The map node memory pool pointer.
在文件 base_map.h 第 136 行定义.
|
protected |
@bried Keep the index of preloading nodes.
在文件 base_map.h 第 138 行定义.