Apollo 10.0
自动驾驶开放平台
|
The data structure of the base map. 更多...
#include <base_map.h>
Public 成员函数 | |
BaseMap (BaseMapConfig *map_config) | |
The constructor. | |
virtual | ~BaseMap () |
The destructor. | |
virtual void | InitMapNodeCaches (int cacheL1_size, int cahceL2_size) |
Init load threadpool and preload threadpool. | |
BaseMapNode * | GetMapNode (const MapNodeIndex &index) |
Get 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) const |
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. | |
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 | AttachMapNodePool (BaseMapNodePool *p_map_node_pool) |
Attach map node pointer. | |
void | WriteBinary (FILE *file) |
Write all the map nodes to a single binary file stream. | |
void | LoadBinary (FILE *file, std::string map_folder_path="") |
Load all the map nodes from a single binary file stream. | |
const BaseMapConfig & | GetConfig () const |
Get the map config. | |
BaseMapConfig & | GetConfig () |
Get the map config. | |
Protected 成员函数 | |
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 (MapNodeIndex index, bool is_reserved=false) |
Load map node by index, thread_safety. | |
Protected 属性 | |
BaseMapConfig * | map_config_ |
The map settings. | |
std::list< MapNodeIndex > | map_nodes_disk_ |
All the map nodes in the Map (in the disk). | |
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc | destroy_func_lvl1_ |
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc | destroy_func_lvl2_ |
MapNodeCache< MapNodeIndex, BaseMapNode > * | map_node_cache_lvl1_ |
The cache for map node preload. | |
MapNodeCache< MapNodeIndex, BaseMapNode > * | map_node_cache_lvl2_ |
brief The dynamic map node preloading thread pool pointer. | |
BaseMapNodePool * | map_node_pool_ |
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. | |
The data structure of the base map.
在文件 base_map.h 第 35 行定义.
|
explicit |
The constructor.
在文件 base_map.cc 第 29 行定义.
|
virtual |
void apollo::localization::msf::BaseMap::AddDataset | ( | const std::string | dataset_path | ) |
Add a dataset path to the map config.
在文件 base_map.cc 第 114 行定义.
void apollo::localization::msf::BaseMap::AttachMapNodePool | ( | BaseMapNodePool * | p_map_node_pool | ) |
|
inline |
|
inline |
BaseMapNode * apollo::localization::msf::BaseMap::GetMapNode | ( | const MapNodeIndex & | index | ) |
Get the map node, if it's not in the cache, return false.
在文件 base_map.cc 第 61 行定义.
BaseMapNode * apollo::localization::msf::BaseMap::GetMapNodeSafe | ( | const MapNodeIndex & | index | ) |
Return the map node, if it's not in the cache, safely load it.
在文件 base_map.cc 第 67 行定义.
|
virtual |
Init load threadpool and preload threadpool.
在文件 base_map.cc 第 46 行定义.
bool apollo::localization::msf::BaseMap::IsMapNodeExist | ( | const MapNodeIndex & | index | ) | const |
Check if the map node in the cache.
在文件 base_map.cc 第 97 行定义.
void apollo::localization::msf::BaseMap::LoadBinary | ( | FILE * | file, |
std::string | map_folder_path = "" |
||
) |
Load all the map nodes from a single binary file stream.
It's for binary streaming or packing.
<map_folder_path> | The new map folder path to save the map. |
<return> | The size read (the real size of body). |
|
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
被 apollo::localization::msf::LosslessMap, apollo::localization::msf::LossyMap2D , 以及 apollo::localization::msf::NdtMap 重载.
在文件 base_map.cc 第 407 行定义.
|
protected |
Load map node by index.
在文件 base_map.cc 第 120 行定义.
|
protected |
Load map node by index, thread_safety.
在文件 base_map.cc 第 236 行定义.
|
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
被 apollo::localization::msf::LosslessMap, apollo::localization::msf::LossyMap2D , 以及 apollo::localization::msf::NdtMap 重载.
在文件 base_map.cc 第 268 行定义.
|
protected |
Load map node by index.
在文件 base_map.cc 第 187 行定义.
bool apollo::localization::msf::BaseMap::SetMapFolderPath | ( | const std::string | folder_path | ) |
Set the directory of the map.
在文件 base_map.cc 第 101 行定义.
void apollo::localization::msf::BaseMap::WriteBinary | ( | FILE * | file | ) |
Write all the map nodes to a single binary file stream.
It's for binary streaming or packing.
<buf,buf_size> | The buffer and its size. |
<return> | The required or the used size of is returned. |
|
protected |
在文件 base_map.h 第 109 行定义.
|
protected |
在文件 base_map.h 第 110 行定义.
|
protected |
The map settings.
在文件 base_map.h 第 105 行定义.
|
protected |
The mutex for preload map node.
在文件 base_map.h 第 120 行定义.
|
protected |
The cache for map node preload.
在文件 base_map.h 第 112 行定义.
|
protected |
brief The dynamic map node preloading thread pool pointer.
在文件 base_map.h 第 114 行定义.
|
protected |
The map node memory pool pointer.
在文件 base_map.h 第 116 行定义.
|
protected |
All the map nodes in the Map (in the disk).
在文件 base_map.h 第 107 行定义.
|
protected |
@bried Keep the index of preloading nodes.
在文件 base_map.h 第 118 行定义.