32 namespace localization {
34 namespace pyramid_map {
49 bool create_map_cells =
true) = 0;
66 bool Load(
const char* filename);
72 unsigned int* y)
const;
74 unsigned int* y)
const;
140 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
147 const std::vector<std::string>& paths)
const;
150 const std::vector<std::string>& paths)
const;
float GetMapResolution() const
Get the resolution of this map nodex.
Definition: base_map_node.h:132
virtual size_t LoadHeaderBinary(const unsigned char *buf)
Load the map node header from a binary chunk.
virtual bool LoadBinary(FILE *file)
Load the map cell from a binary chunk.
Eigen::Vector2d left_top_corner_
The left top corner of the map node in the global coordinate system.
Definition: base_map_node.h:193
void SetIsReserved(bool is_reserved)
Set if the map node is reserved.
Definition: base_map_node.h:107
bool SaveIntensityImage() const
Save intensity image of node.
bool GetIsReady() const
Get if the map node data is ready.
Definition: base_map_node.h:119
virtual size_t LoadBodyBinary(std::vector< unsigned char > *buf)
Load the map node body from a binary chunk.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
virtual size_t GetHeaderBinarySize() const
Get the size of the header in bytes.
virtual ~BaseMapNode()
Destruct a map node.
bool is_reserved_
If the node is reserved in map.
Definition: base_map_node.h:202
Eigen::Vector2d Vector2d
Definition: base_map_fwd.h:36
static Eigen::Vector2d ComputeLeftTopCorner(const BaseMapConfig &config, const MapNodeIndex &index)
virtual size_t GetBodyBinarySize() const
Get the size of the body in bytes.
size_t uncompressed_file_body_size_
Definition: base_map_node.h:210
virtual bool CreateBinary(FILE *file) const
Create the binary. Serialization of the object.
virtual void ResetMapNode()
Reset map cells data.
Eigen::Vector3d Vector3d
Definition: frame_transform.h:27
void SetLeftTopCorner(double x, double y)
Set the left top corner of the map node.
Definition: base_map_node.h:126
bool GetIsReserved() const
Get if the map node is reserved.
Definition: base_map_node.h:110
bool is_changed_
Has the map node been changed.
Definition: base_map_node.h:204
std::shared_ptr< BaseMapMatrix > map_matrix_
The data structure of the map datas, which is a matrix.
Definition: base_map_node.h:198
virtual void Init(const BaseMapConfig *map_config)=0
Initialize the map node. Call this function first before use it!
bool data_is_ready_
Definition: base_map_node.h:206
virtual bool GetCoordinate(const Eigen::Vector2d &coordinate, unsigned int *x, unsigned int *y) const
Given the global coordinate, get the local 2D coordinate of the map cell matrix. <return> If global c...
The data structure of the map cells in a map node.
Definition: base_map_matrix.h:30
MapNodeIndex index_
The index of this node.
Definition: base_map_node.h:189
const BaseMapNodeConfig & GetMapNodeConfig() const
Get the map node config.
Definition: base_map_node.h:97
bool SaveAltitudeImage() const
Save altitude image of node.
bool CreateMapDirectoryRecursively(const std::vector< std::string > &paths) const
Try to create the map directory recursively.
std::vector< float > map_resolutions_
The pixel resolutions in the map in meters.
Definition: base_map_config.h:76
std::shared_ptr< CompressionStrategy > compression_strategy_
Definition: base_map_node.h:212
The data structure of a Node in the map.
Definition: base_map_node.h:37
void SetMapNodeIndex(const MapNodeIndex &index)
Set the map node index.
virtual size_t CreateHeaderBinary(unsigned char *buf, size_t buf_size) const
Create the binary header.
BaseMapMatrix & GetMapCellMatrix()
Definition: base_map_node.h:91
virtual size_t GetBinarySize() const
Get the binary size of the object.
const BaseMapMatrix & GetMapCellMatrix() const
Get map cell matrix.
Definition: base_map_node.h:90
const BaseMapConfig & GetMapConfig() const
Get the map settings.
Definition: base_map_node.h:94
virtual void Finalize()
call before deconstruction or reset.
bool GetIsChanged() const
Get if the map data has changed.
Definition: base_map_node.h:113
virtual size_t CreateBodyBinary(std::vector< unsigned char > *buf) const
Create the binary body.
const MapNodeIndex & GetMapNodeIndex() const
Get the map node index.
Definition: base_map_node.h:102
bool Save()
Save the map node to the disk.
The map node config info.
Definition: base_map_node_config.h:31
std::shared_ptr< BaseMapNodeConfig > map_node_config_
The map node config.
Definition: base_map_node.h:196
size_t file_body_binary_size_
The body binary size in file.
Definition: base_map_node.h:208
bool CheckMapDirectoryRecursively(const std::vector< std::string > &paths) const
Try to check the map directory recursively.
The options of the reflectance map.
Definition: base_map_config.h:42
BaseMapNode()
Construct a map node.
Definition: base_map_node_index.h:33
void SetIsChanged(bool is)
Set if the map node data has changed.
Definition: base_map_node.h:116
bool CreateMapDirectory(const std::string &path) const
Try to create the map directory.
std::shared_ptr< BaseMapMatrixHandler > map_matrix_handler_
The class to load and create map matrix binary.
Definition: base_map_node.h:200
Definition: compression.h:25
bool Load()
Load the map node from the disk.
virtual void InitMapMatrix(const BaseMapConfig *map_config)
Initialize the map matrix.
const Eigen::Vector2d & GetLeftTopCorner() const
Definition: base_map_node.h:121
const BaseMapConfig * map_config_
The map settings.
Definition: base_map_node.h:186