33namespace localization {
35namespace pyramid_map {
64 void AddDataset(
const std::string dataset_path);
76 const Eigen::Vector3d& trans_diff,
77 unsigned int resolution_id,
unsigned int zone_id);
84 virtual bool LoadMapArea(
const Eigen::Vector3d& seed_pt3d,
85 unsigned int resolution_id,
unsigned int zone_id,
86 int filter_size_x,
int filter_size_y);
120 bool is_reserved =
false);
130 std::unique_ptr<MapNodeCache<MapNodeIndex, BaseMapNode>>
133 std::unique_ptr<MapNodeCache<MapNodeIndex, BaseMapNode>>
std::function< bool(Element *)> DestroyFunc
The options of the reflectance map.
The memory pool for the data structure of BaseMapNode.
The data structure of a Node in the map.
The data structure of the base map.
BaseMapConfig & GetMapConfig()
Get the map config.
std::vector< std::string > all_map_node_md5s_
All the map nodes' md5 in the Map (in the disk).
bool SetMapFolderPath(const std::string folder_path)
Set the directory of the map.
void PreloadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
BaseMapNode * GetMapNodeSafe(const MapNodeIndex &index)
Return the map node, if it's not in the cache, safely load it.
void AddDataset(const std::string dataset_path)
Add a dataset path to the map config.
void GetAllMapIndexAndPath()
bool CheckMapStrictly()
Check if map is normal(with map node checking).
BaseMapConfig * map_config_
The map settings.
const std::vector< std::string > & GetAllMapNodeMd5s() const
Get all map node md5s.
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl1_
void LoadMapNodeThreadSafety(const MapNodeIndex &index, bool is_reserved=false)
Load map node by index, thread_safety.
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).
void Release()
Release resources.
std::unique_ptr< MapNodeCache< MapNodeIndex, BaseMapNode > > map_node_cache_lvl2_
brief The dynamic map node preloading thread pool pointer.
BaseMapNode * GetMapNode(const MapNodeIndex &index)
Return the map node, if it's not in the cache, return false.
virtual void InitMapNodeCaches(int cacheL1_size, int cahceL2_size)
const BaseMapConfig & GetMapConfig() const
Get the map config.
std::unique_ptr< MapNodeCache< MapNodeIndex, BaseMapNode > > map_node_cache_lvl1_
The cache for map node preload.
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl2_
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.
virtual ~BaseMap()
The destructor.
BaseMapNodePool * map_node_pool_
The map node memory pool pointer.
bool CheckMap()
Check if map is normal.
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.
bool IsMapNodeExist(const MapNodeIndex &index)
Check if the map node in the cache.
MapNodeIndex GetMapIndexFromMapPath(const std::string &map_path)
const std::vector< std::string > & GetAllMapNodePaths() const
Get all map node paths.
void CheckAndUpdateCache(std::set< MapNodeIndex > *map_ids)
Check map node in L2 Cache.
void AttachMapNodePool(BaseMapNodePool *p_map_node_pool)
Attach map node pointer.
std::vector< std::string > all_map_node_paths_
void LoadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
void ComputeMd5ForAllMapNodes()
Compute md5 for all map node file in map.
std::set< MapNodeIndex > map_preloading_task_index_
@bried Keep the index of preloading nodes.