31 namespace localization {
55 void AddDataset(
const std::string dataset_path);
65 unsigned int resolution_id,
unsigned int zone_id);
72 unsigned int resolution_id,
unsigned int zone_id,
73 int filter_size_x,
int filter_size_y);
89 void LoadBinary(FILE* file, std::string map_folder_path =
"");
The data structure of the base map.
Definition: base_map.h:35
The data structure of the LRUCache.
Definition: base_map_cache.h:33
BaseMapNodePool * map_node_pool_
The map node memory pool pointer.
Definition: base_map.h:116
BaseMapNode * GetMapNodeSafe(const MapNodeIndex &index)
Return the map node, if it's not in the cache, safely load it.
The options of the reflectance map.
Definition: base_map_config.h:32
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
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. If the forecasts are correct in last frame...
virtual ~BaseMap()
The destructor.
void PreloadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
BaseMapNode * GetMapNode(const MapNodeIndex &index)
Get the map node, if it's not in the cache, return false.
boost::recursive_mutex map_load_mutex_
The mutex for preload map node.
Definition: base_map.h:120
std::set< MapNodeIndex > map_preloading_task_index_
Definition: base_map.h:118
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl1_
Definition: base_map.h:109
void AddDataset(const std::string dataset_path)
Add a dataset path to the map config.
void WriteBinary(FILE *file)
Write all the map nodes to a single binary file stream. It's for binary streaming or packing...
The memory pool for the data structure of BaseMapNode.
Definition: base_map_pool.h:32
Eigen::Vector3d Vector3d
Definition: frame_transform.h:27
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. It will forecasts the nodes by the directi...
BaseMap(BaseMapConfig *map_config)
The constructor.
void 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...
BaseMapConfig * map_config_
The map settings.
Definition: base_map.h:105
const BaseMapConfig & GetConfig() const
Get the map config.
Definition: base_map.h:92
std::function< bool(Element *)> DestroyFunc
Definition: base_map_cache.h:35
bool IsMapNodeExist(const MapNodeIndex &index) const
Check if the map node in the cache.
MapNodeCache< MapNodeIndex, BaseMapNode > * map_node_cache_lvl1_
The cache for map node preload.
Definition: base_map.h:112
virtual void InitMapNodeCaches(int cacheL1_size, int cahceL2_size)
Init load threadpool and preload threadpool.
MapNodeCache< MapNodeIndex, BaseMapNode > * map_node_cache_lvl2_
Definition: base_map.h:114
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl2_
Definition: base_map.h:110
void LoadMapNodeThreadSafety(MapNodeIndex index, bool is_reserved=false)
Load map node by index, thread_safety.
BaseMapConfig & GetConfig()
Get the map config.
Definition: base_map.h:94
void AttachMapNodePool(BaseMapNodePool *p_map_node_pool)
Attach map node pointer.
std::list< MapNodeIndex > map_nodes_disk_
All the map nodes in the Map (in the disk).
Definition: base_map.h:107
bool SetMapFolderPath(const std::string folder_path)
Set the directory of the map.
Definition: base_map_node_index.h:32
The data structure of a Node in the map.
Definition: base_map_node.h:32
void LoadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.