28namespace localization {
41 bool create_map_cells =
true);
55 bool Load(
const char* filename);
115 bool GetCoordinate(
const Eigen::Vector2d& coordinate,
unsigned int* x,
116 unsigned int* y)
const;
117 bool GetCoordinate(
const Eigen::Vector3d& coordinate,
unsigned int* x,
118 unsigned int* y)
const;
121 Eigen::Vector2d
GetCoordinate(
unsigned int x,
unsigned int y)
const;
130 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
152 unsigned int buf_size)
const;
158 virtual unsigned int LoadBodyBinary(std::vector<unsigned char>* buf);
163 virtual unsigned int CreateBodyBinary(std::vector<unsigned char>* buf)
const;
The options of the reflectance map.
std::vector< float > map_resolutions_
The pixel resolutions in the map in meters.
The data structure of the map cells in a map node.
The data structure of a Node in the map.
const Eigen::Vector2d & GetLeftTopCorner() const
Get the left top corner of the map node.
void SetMapNodeIndex(const MapNodeIndex &index)
Set the map node index.
virtual unsigned int CreateBinary(FILE *file) const
Create the binary.
BaseMapMatrix * map_matrix_
The data structure of the map datas, which is a matrix.
virtual void Init(const BaseMapConfig *map_config, const MapNodeIndex &index, bool create_map_cells=true)
Initialize the map node.
MapNodeIndex index_
The index of this node.
unsigned int file_body_binary_size_
The body binary size in file.
virtual void ResetMapNode()
Reset map cells data.
virtual unsigned int LoadBinary(FILE *file)
Load the map cell from a binary chunk.
bool SaveIntensityImage() const
Save intensity image of node.
const MapNodeIndex & GetMapNodeIndex() const
Get the map node index.
virtual unsigned int CreateHeaderBinary(unsigned char *buf, unsigned int buf_size) const
Create the binary header.
virtual void InitMapMatrix(const BaseMapConfig *map_config)
Initialize the map matrix.
bool is_changed_
Has the map node been changed.
const BaseMapMatrix & GetMapCellMatrix() const
Get map cell matrix.
void SetIsChanged(bool is)
Set if the map node data has changed.
void SetLeftTopCorner(double x, double y)
virtual ~BaseMapNode()
Destruct a map node.
bool GetIsReserved() const
Get if the map node is reserved.
BaseMapMatrix & GetMapCellMatrix()
virtual void Finalize()
call before deconstruction or reset.
bool is_reserved_
If the node is reserved in map.
CompressionStrategy * compression_strategy_
@bried The compression strategy.
bool Load()
Load the map node from the disk.
bool Save()
Save the map node to the disk.
virtual unsigned int LoadHeaderBinary(unsigned char *buf)
Load the map node header from a binary chunk.
virtual unsigned int GetBodyBinarySize() const
Get the size of the body in bytes.
const BaseMapConfig * map_config_
The map settings.
float min_altitude_
The min altitude of point cloud in the node.
bool GetIsChanged() const
Get if the map data has changed.
virtual unsigned int LoadBodyBinary(std::vector< unsigned char > *buf)
Load the map node body from a binary chunk.
virtual unsigned int CreateBodyBinary(std::vector< unsigned char > *buf) const
Create the binary body.
Eigen::Vector2d left_top_corner_
The left top corner of the map node in the global coordinate system.
void SetIsReserved(bool is_reserved)
Set if the map node is reserved.
float GetMapResolution() const
Get the resolution of this map nodex.
virtual unsigned int GetBinarySize() const
Get the binary size of the object.
bool GetIsReady() const
Get if the map node data is ready
const BaseMapConfig & GetMapConfig() const
Get the map settings.
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.
virtual unsigned int GetHeaderBinarySize() const
Get the size of the header in bytes.
unsigned int resolution_id_
The ID of the resolution.