31namespace localization {
55 void AddDataset(
const std::string dataset_path);
64 const Eigen::Vector3d& trans_diff,
65 unsigned int resolution_id,
unsigned int zone_id);
71 virtual bool LoadMapArea(
const Eigen::Vector3d& seed_pt3d,
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 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.
void AddDataset(const std::string dataset_path)
Add a dataset path to the map config.
std::list< MapNodeIndex > map_nodes_disk_
All the map nodes in the Map (in the disk).
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.
void WriteBinary(FILE *file)
Write all the map nodes to a single binary file stream.
BaseMapConfig * map_config_
The map settings.
BaseMapConfig & GetConfig()
Get the map config.
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl2_
virtual void InitMapNodeCaches(int cacheL1_size, int cahceL2_size)
Init load threadpool and preload threadpool.
void AttachMapNodePool(BaseMapNodePool *p_map_node_pool)
Attach map node pointer.
void LoadBinary(FILE *file, std::string map_folder_path="")
Load all the map nodes from a single binary file stream.
boost::recursive_mutex map_load_mutex_
The mutex for preload map node.
bool SetMapFolderPath(const std::string folder_path)
Set the directory of the map.
MapNodeCache< MapNodeIndex, BaseMapNode > * map_node_cache_lvl2_
brief The dynamic map node preloading thread pool pointer.
void LoadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
std::set< MapNodeIndex > map_preloading_task_index_
@bried Keep the index of preloading nodes.
void PreloadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
BaseMapNodePool * map_node_pool_
The map node memory pool pointer.
bool IsMapNodeExist(const MapNodeIndex &index) const
Check if the map node in the cache.
const BaseMapConfig & GetConfig() const
Get the map config.
BaseMapNode * GetMapNodeSafe(const MapNodeIndex &index)
Return the map node, if it's not in the cache, safely load it.
void LoadMapNodeThreadSafety(MapNodeIndex index, bool is_reserved=false)
Load map node by index, thread_safety.
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl1_
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.
MapNodeCache< MapNodeIndex, BaseMapNode > * map_node_cache_lvl1_
The cache for map node preload.
BaseMapNode * GetMapNode(const MapNodeIndex &index)
Get the map node, if it's not in the cache, return false.
The data structure of the LRUCache.
std::function< bool(Element *)> DestroyFunc