33 namespace localization {
35 namespace pyramid_map {
64 void AddDataset(
const std::string dataset_path);
77 unsigned int resolution_id,
unsigned int zone_id);
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>>
virtual ~BaseMap()
The destructor.
void PreloadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
virtual void InitMapNodeCaches(int cacheL1_size, int cahceL2_size)
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl2_
Definition: base_map.h:128
std::unique_ptr< MapNodeCache< MapNodeIndex, BaseMapNode > > map_node_cache_lvl2_
Definition: base_map.h:134
BaseMapNodePool * map_node_pool_
The map node memory pool pointer.
Definition: base_map.h:136
bool CheckMapStrictly()
Check if map is normal(with map node checking).
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
BaseMapConfig & GetMapConfig()
Get the map config.
Definition: base_map.h:99
std::vector< std::string > all_map_node_md5s_
All the map nodes' md5 in the Map (in the disk).
Definition: base_map.h:147
void AddDataset(const std::string dataset_path)
Add a dataset path to the map config.
Eigen::Vector3d Vector3d
Definition: frame_transform.h:27
const std::vector< std::string > & GetAllMapNodeMd5s() const
Get all map node md5s.
Definition: base_map.h:105
MapNodeIndex GetMapIndexFromMapPath(const std::string &map_path)
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...
bool CheckMap()
Check if map is normal.
BaseMapNode * GetMapNodeSafe(const MapNodeIndex &index)
Return the map node, if it's not in the cache, safely load it.
bool SetMapFolderPath(const std::string folder_path)
Set the directory of the map.
The memory pool for the data structure of BaseMapNode.
Definition: base_map_pool.h:34
std::function< bool(Element *)> DestroyFunc
Definition: base_map_cache.h:35
void Release()
Release resources.
BaseMapNode * GetMapNode(const MapNodeIndex &index)
Return the map node, if it's not in the cache, return false.
std::vector< std::string > all_map_node_paths_
Definition: base_map.h:144
The data structure of a Node in the map.
Definition: base_map_node.h:37
bool IsMapNodeExist(const MapNodeIndex &index)
Check if the map node in the cache.
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc destroy_func_lvl1_
Definition: base_map.h:127
void CheckAndUpdateCache(std::set< MapNodeIndex > *map_ids)
Check map node in L2 Cache.
BaseMap(BaseMapConfig *config)
The constructor.
std::unique_ptr< MapNodeCache< MapNodeIndex, BaseMapNode > > map_node_cache_lvl1_
The cache for map node preload.
Definition: base_map.h:131
void ComputeMd5ForAllMapNodes()
Compute md5 for all map node file in map.
const std::vector< std::string > & GetAllMapNodePaths() const
Get all map node paths.
Definition: base_map.h:101
The data structure of the base map.
Definition: base_map.h:38
void GetAllMapIndexAndPath()
void LoadMapNodes(std::set< MapNodeIndex > *map_ids)
Load map node by index.
boost::recursive_mutex map_load_mutex_
The mutex for preload map node.
Definition: base_map.h:140
The options of the reflectance map.
Definition: base_map_config.h:42
void LoadMapNodeThreadSafety(const MapNodeIndex &index, bool is_reserved=false)
Load map node by index, thread_safety.
std::set< MapNodeIndex > map_preloading_task_index_
Definition: base_map.h:138
Definition: base_map_node_index.h:33
const BaseMapConfig & GetMapConfig() const
Get the map config.
Definition: base_map.h:97
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...
BaseMapConfig * map_config_
The map settings.
Definition: base_map.h:125
void AttachMapNodePool(BaseMapNodePool *p_map_node_pool)
Attach map node pointer.
std::vector< MapNodeIndex > all_map_node_indices_
All the map nodes in the Map (in the disk).
Definition: base_map.h:143